Management

FileTree

A recursive folder and file browser with expand/collapse, keyboard navigation, and selection.

This component is coming soon.

FileTree renders a recursive tree of folders and files. It handles expand/collapse state, keyboard navigation, and optional single or multi-selection — without imposing any storage or data-fetching opinion.

Planned API

<FileTree
  nodes={[
    {
      id: "docs",
      name: "docs",
      type: "folder",
      children: [
        { id: "readme", name: "README.md", type: "file" },
        { id: "guide", name: "guide.pdf", type: "file" },
      ],
    },
    { id: "logo", name: "logo.svg", type: "file" },
  ]}
  onSelect={(node) => console.log(node)}
/>
PropTypeDescription
nodesTreeNode[]The root-level nodes. Each node has id, name, type ("file" or "folder"), and optional children.
onSelect(node: TreeNode) => voidCalled when a node is clicked.
defaultExpandedstring[]IDs of folders to expand on first render.
selectedstringID of the currently selected node (controlled).

Last Updated on Jun 22, 2026

On this page