Atelier UI

搜索组件…

搜索组件…

File Tree

文件树:可展开折叠的 tree 结构,支持方向键、Home / End、Enter 与空格。

在沙盒中编辑

复制一段给 AI 编程工具的提示词,包含源码、依赖和用法

属性

FileTreeProps

同时支持以下类型的全部属性: Omit<React.ComponentProps<"ul">, "children" | "onSelect">

属性类型默认值说明
nodes* 必填FileTreeNode[]——
defaultExpandedstring[][]Paths ("src/app") that start expanded
onSelect(path: string) => void——

安装

$ npx shadcn@latest add https://chromotion.dev/r/file-tree.json

同类组件