File Tree
A compact repository tree with selection, nesting, expansion, and change status.
Repository
Installation
Add the component source directly to your project.
pnpm dlx shadcn@latest add https://pastaui.com/r/file-tree.jsonAPI reference
File Tree
| Prop | Type | Default | Description |
|---|---|---|---|
items | FileTreeItem[] | — | Provides visible files, folders, nesting, and change state. |
selectedId | string | — | Marks the currently selected node. |
onSelect | (id: string) => void | — | Handles file or folder selection. |