Skip to content

Tree

Last updated 6 Nov 2026

NbTree and NbTreeNode provide a hierarchical tree view for navigating nested data structures like file systems, project explorers, or organizational charts.

Branch vs Leaf Nodes ​

Nodes with child NbTreeNode elements are branches -- they show a caret chevron and can be expanded/collapsed. Nodes without children are leaves.

Compact Mode ​

Use the compact prop or size="sm" for denser tree views (24px row height instead of 32px).

Actions Slot ​

Use the actions slot on NbTreeNode to render action buttons or badges on the right side. Actions are visible on hover and when the node is selected.

Meta Slot ​

Use the meta slot for what a row is rather than what you can do with it: a status, a count, a date. Unlike actions, it is always visible, because a status that only appeared on hover would hide the thing a reader scans the tree for. When both are used, meta sits first and the actions follow it.

Deep Nesting ​

Trees support unlimited nesting depth. Indentation increases by 16px per level.