File Tree
shadcn/uiCollapsible folder tree showing modified, added, and deleted workspace files.
File Tree
Installation
Props
<FileTree />
Name | Type | |
|---|---|---|
selectedPath | string | |
defaultSelectedPath | string | |
onSelectPath | ((path: string) => void) |
<FileTreeFolder />
Name | Type | |
|---|---|---|
path | string | |
defaultOpen | boolean(default: false) | |
open | boolean | |
onOpenChange | ((open: boolean) => void) | |
status | import("/vercel/path0/registry/optics/ai-elements/file-tr... | |
icon | React.ReactNode | |
render | React.ReactElement |
<FileTreeFile />
Name | Type | |
|---|---|---|
path | string | |
status | import("/vercel/path0/registry/optics/ai-elements/file-tr... | |
icon | React.ReactNode | |
variant | "link" | "outline" | "default"(default: ghost) | |
render | React.ReactElement | |
nativeButton | boolean | |
animation | "none" | "all" | "colors" | "only-scale" | |
focusableWhenDisabled | boolean |
<FileTreeStatusBadge />
Name | Type | |
|---|---|---|
status | import("/vercel/path0/registry/optics/ai-elements/file-tr... | |
variant | "link" | "outline" | "default"(default: outline) |