Skip to content
Design System
GitHub

A hierarchy from data: a nested list with guide lines, disclosure buttons and links (list), or a tree widget with arrow keys, type-ahead and one selected node (select).

Tree lineage

Install
npx shadcn add @syncrobotic/tree

Also installs: radix-ui, lucide-react, @syncrobotic/cn

Overview

A hierarchy from data, with a guide line per level: a nested list of links people open and close, or a tree widget to pick one node in.

When to use

  • Data lineage: a release, the label sets it was trained on, and their sources.
  • Sites › zones › robots, to read or to pick one.
  • The folders and files of a dataset, as a file explorer.

Use something else

  • One level of rows: Grouped list.
  • Where this page sits among its parents: Breadcrumb.
  • Sections of one page that open and close: Accordion.
  • Rows with columns to compare: Data grid with expanding rows.
  • Nodes with several parents (one source under two label sets, steps that run in parallel and meet): Graph.

More examples

States and real uses. Each example is also a Storybook story and a visual regression test.

  • Evaluation sets4
  • Training sets2
  • Archived0

Tree collapsed

  • images 3
    • dock-03_0412.jpg 2.4 MB
    • dock-03_0413.jpg 2.3 MB
    • aisle-12_0090.jpg 2.6 MB
  • labels 2
    • boxes.json 18 MB
    • pallet-edges.json 6 MB
  • raw.tar.gz 38 GB
  • README.md 4 KB

Open: labels/boxes.json

Tree file explorer

  • captures
  • manifest.json 12 KB

Tree disabled

No sources recorded for this release yet.

Tree empty

Usage rules

  • list (default) for a hierarchy people read and follow links in: lineage, an outline. select only when choosing a node is the job (a file explorer, a site picker): it is one Tab stop with arrow keys, and its nodes are not links.
  • A node used twice (a source under two label sets) is named again with a marker in meta, "(listed above)", not drawn twice in full. When many nodes have several parents, it is a Graph.
  • meta is a count, a size or a calm state word, in muted text; never a coloured status. A disabled node says why in its meta.
  • Open what people came for (defaultExpanded or expandAll for short trees); a deep tree starts collapsed.
  • Give textValue when label is not a string, so type-ahead and screen readers have its name.

Changelog

  • 0.27.02026-11-21An empty folder opens and closes in place; it opened as tall as its parent folder before snapping shut.
  • 0.18.22026-11-21Compiles with noUncheckedIndexedAccess, as strict products build it; behaviour unchanged.
  • 0.18.12026-11-21Type-ahead times letters by the key event's own timeStamp instead of calling Date.now() in the component, so it is safe under the React Compiler. Same half-second window.

How to upgrade