A file tree with depth rails, status boxes (modified, added, changed counts), children that grow in staggered as folders open, an ink selection, and the full WAI-ARIA tree keyboard.
pnpm dlx shadcn@latest add @beautiful-ui-pro/tree-viewNeeds your registry key. Your components.json style picks the Base UI or Radix build: radix-*, new-york and default get Radix, base-* gets Base UI.
The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
Import it and pass your content. The props that matter most are listed next.
import { TreeView, type TreeItem } from "@/components/ui/notchset/tree-view";
const repo: TreeItem[] = [
{
name: "relay",
children: [
{ name: "agents", children: [{ name: "planner.ts", status: "M", lines: 214 }, { name: "triage.ts", lines: 98 }] },
{ name: "evals", children: [{ name: "planner-core.yaml", status: "+", lines: 40 }] },
{ name: "README.md", lines: 62 },
],
},
];
export function RepoTree() {
return <TreeView items={repo} title="RELAY" subtitle="/ MAIN" defaultExpanded={["relay"]} />;
}items–
{ name, status?, lines?, children? }[]The tree.
title / subtitle–
ReactNodeThe header, with the changed count.
defaultExpanded / defaultSelected–
string[] / stringPaths like relay/agents.
onSelect–
(path) => voidOn selection.
describe–
(node) => stringThe footer's detail.
components/ui/notchset/tree-view.tsx
This component is included with Pro.
Try the live preview above. Get Pro to install the source.