Tree

A collapsible hierarchical tree.

File tree (icons)

Expanded

API reference

bui-tree

Inputs

PropTypeDefaultDescription
itemsreadonly TreeItem[][]Root nodes of the tree to render.
ariaLabelstring'Tree'Accessible label for the tree's root element.

bui-tree-node

Inputs

PropTypeDefaultDescription
item*TreeItemNode data for this row, including its label and children.
levelnumber1Depth of this node, used for indentation and `aria-level` (root is 1).

Types

TreeItem

FieldTypeDescription
labelstringText displayed for the node.
children?TreeItem[]Nested child nodes, if any.
expanded?false | trueWhether the node starts expanded.

Every ng-blatui component also accepts a class input to merge extra Tailwind classes onto the host.