ns-ui

Tree Root Trace

File/nav tree whose indent guides are a single living root system — an SVG path draws itself down from a parent's junction and elbows into each child row as it expands, retracting on collapse instead of toggling static border-left lines.

Use when the indent guides themselves should be alive, an SVG path growing down from each expanded parent and elbowing into every child row rather than static border-left rules toggling on; pick tree-box-drawing instead when the connectors should be monospace glyphs that reflow as siblings vanish, or tree-hinge-fold when the animated element is the child group swinging open rather than the guide drawing itself.

Install

npx shadcn add https://design.helpmarq.com/r/tree-root-trace.json
  • tree
  • navigation
  • file-tree
  • hierarchy
  • svg
  • keyboard
  • sidebar

ns-ui / tree-root-trace — the guide grows from the junction

src
utils.ts
package.json
README.md

Props

PropTypeDefaultDescription
labelstringAccessible name for the tree, e.g. "Project files".
nodesTaprootNode[]
defaultExpandedIds?string[]Node ids expanded on first render, statically — no draw-in animation for these.
className?string
id?string