Hierarchical table for folders, org structures, categories, and other parent/child records. Rows expand in place while keeping tabular columns aligned.
| Prop | Type | Default | Description |
|---|---|---|---|
nodes | TreeTableNode[] | required | Root nodes with optional children. |
columns | TreeTableColumn[] | required | Column headers and cell renderers. The first column shows the disclosure control. |
ariaLabel | string | required | Accessible table name. |
expandedIds | string[] | — | Controlled expansion. Pair with onExpandedChange. |
defaultExpandedIds | string[] | [] | Initial expansion in uncontrolled usage. |
onExpandedChange | (ids: string[]) => void | — | Fired when a row or expand-all is toggled. |
onRowClick | (node) => void | — | Makes rows keyboard-activatable. |
density | "compact" | "standard" | "comfortable" | "standard" | Row spacing. |
stickyHeader | boolean | false | Keeps headers visible while scrolling. |
aria-level and aria-expanded for tree navigation.Copy this complete component into a page file. Edit and run it in the Playground.
Loading editor…