Tree Nav
A sidebar tree of any depth. Branches open by height, one highlight slides to the current item across levels, and an icon rail shows labels in a flyout.
pixikit.com/docs/app-ui/navigation/tree-nav
Customize
Accordion
Auto reveal
Collapsed
Density
Props
14| Name | Type | Default | Description |
|---|---|---|---|
items | TreeNavItem[] | None | The items of the tree, nested. |
groups | TreeNavGroup[] | None | Labelled sections, used instead of `items`. |
value | string | None | The id of the current item, when you hold the state. |
defaultValue | string | None | The current item at first, when the tree holds the state. |
onValueChange | (id: string) => void | None | Called with the id of the item the user activates. |
expanded | string[] | None | The ids of the open parents, when you hold the state. |
defaultExpanded | string[] | None | The open parents at first, when the tree holds the state. |
onExpandedChange | (ids: string[]) => void | None | Called with the ids of the open parents after a change. |
accordion | boolean | false | Opening a parent closes its siblings. |
autoReveal | boolean | true | Opens the parents of the current item on mount and when it changes. |
collapsed | boolean | false | Icon-only rail: labels hide and show in a small flyout on hover and focus. |
density | "comfortable" | "compact" | "comfortable" | The height of a row. |
ariaLabel | string | "Navigation" | Name for the tree, read by screen readers. |
className | string | None |