codesandbox / sandpack

A component toolkit for creating live-running code editing experiences, using the power of CodeSandbox.
https://sandpack.codesandbox.io
Apache License 2.0
4.86k stars 344 forks source link

File Explorer #98

Closed max-sym closed 3 years ago

max-sym commented 3 years ago

Hi, huge thanks for this amazing open-source lib!

One question: what would be the best way to implement a file tree (on the left side, as in CSB)? Are there any hidden places in this library / any external ready-for-use libraries / examples that can be used for this purpose?

Thanks!

danilowoz commented 3 years ago

Hey @MaxChu23, glad you're joining Sandpack!

Currently, we don't officially support the FileExplorer component, as this is a working-in-progress feature, and we're taking it into account for future releases.

However, as we already have a basic version of FileExplorer working - but we are still not confident enough to export it - I think there is no problem sharing this for you, so here's CodeSandbox where you can take these components and implement them on your own in your application.

https://codesandbox.io/s/file-explorer-1ffn6?file=/src/App.tsx:547-565

Hope it helps you.