Tree table

Core

A table with nested rows, tri-state selection, hierarchy-preserving sort, and lazy-loaded children.

pnpm dlx shadcn@latest add https://wui.alann.works/r/tree-table.json
Module
Items
Components
148
Blocks
41

API Reference

PropTypeDefault
rows*TreeTableRow<T>[]required
columns*TreeTableColumn<T>[]required
label*stringrequired
expandedstring[]—
defaultExpandedstring[]—
onExpandedChange(ids: string[]) => void—
selectableboolean—
selectedstring[]—
defaultSelectedstring[]—
onSelectedChange(ids: string[]) => void—
sortTreeTableSort | null—
defaultSortTreeTableSort | null—
onSortChange(sort: TreeTableSort | null) => void—
loadChildren(row: TreeTableRow<T>) => Promise<TreeTableRow<T>[]>—
rowLabel(data: T) => string—
onRowActivate(row: TreeTableRow<T>) => void—
maxHeightnumber | string—
emptyStateReactNode—
classNamestring—
refRef<HTMLDivElement>—
Categories
data
Dependencies
@radix-ui/react-checkboxlucide-reactmotion