File Tree
Expandable file tree with arrow keys, Home/End, Enter and Space following the ARIA tree pattern.
Copy a prompt for your AI coding tool with the source, dependencies and usage
Props
FileTreeProps
Also accepts all props of Omit<React.ComponentProps<"ul">, "children" | "onSelect">
| Prop | Type | Default | Description |
|---|---|---|---|
| nodes* required | FileTreeNode[] | — | — |
| defaultExpanded | string[] | [] | Paths ("src/app") that start expanded |
| onSelect | (path: string) => void | — | — |
Install
$ npx shadcn@latest add https://chromotion.dev/r/file-tree.json