Skip to content
Get Pro

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.json

API reference

File Tree

File Tree properties
PropTypeDefaultDescription
itemsFileTreeItem[]Provides visible files, folders, nesting, and change state.
selectedIdstringMarks the currently selected node.
onSelect(id: string) => voidHandles file or folder selection.