Component libraryTree view
Tree view
ProA keyboard-navigable hierarchy with controlled expansion, selection and optional native actions.
npx shadcn@latest add @tidal-pro/tree-viewInstallation
Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.
Terminal
Import components/ui/tidal.css, components/ui/tree-view.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.
Usage
Complete example source · Dependency and asset manifest
Loading the complete example…
API & behavior
label names the tree. nodes supplies unique string IDs, ReactNode labels/descriptions/icons, required plain textValue strings for typeahead, optional nested children, lazyState content, disabled state, native treeitem props/ref, disclosure props/ref, and optional native action button props/ref/callback. A disabled branch disables its visible descendants. expandedIds/onExpandedChange and selectedId/onSelectedChange are consumer-controlled. Arrow Up/Down, Home/End, logical Arrow Left/Right, Enter/Space and buffered typeahead operate the enabled visible treeitems; caller prevention and IME composition run before owned key behavior. Optional action buttons remain ordinary native Tab stops. labels localizes disclosure names. emptyMessage accepts ReactNode including numeric zero. dir controls logical RTL arrows and layout. disabled makes the whole tree inoperable and exposes its disabled state. The forwarded ref and remaining native attributes target the tree root. Consumers own data loading, expansion acceptance, selection results and action effects.
Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.