114
A project tree that feels like your editor: arrow keys to open folders, git changes marked in colour, F2 to rename and drag to tidy things up.
akaexplorer·folders
Run this in any project set up for the shadcn CLI. It copies the File Tree source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/file-tree.jsonImport it and render it. Every prop has a typed default, so it works straight away, and you pass your own data when you’re ready.
import { FileTree } from "@/components/file-tree";
export default function Page() {
return <FileTree />;
}A free React component in the Workspace collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the File Tree source. Everything is optional unless it says required.
| Prop | Type | Default |
|---|---|---|
| datarequired | FileNode[] | — |
| repo | string | "workspace" |
| branch | string | — |
| defaultExpanded | string[] | [] |
| defaultSelected | string | — |
| onOpen | (node: FileNode) => void | — |
| onRename | (node: FileNode, name: string) => void | — |
| onMove | (node: FileNode, folderId: string | null) => void | — |
| onChange | (data: FileNode[]) => void | — |
| className | string | — |