Skip to Content
Navigation & Menus@hacline/ui/tree

Tree

Navigate hierarchical items that can expand and collapse.

Usage

Browse, collapse, or expand folders using arrow keys. The example builds the hierarchy from items and tracks selection and expansion via node values.

Project docs
delivery-checklist.md
release-process.md
README.md

Cascading Checkable Folders

Combine checkable with checkStrategy="leaf" to report checked leaf items in callbacks.

Design docs
Review notes
Delivery checklist
Test report
1 item selected

Parts

PartDescription
TreeGroup
A branch's children. Rendered while the branch is expanded or animating closed.
TreeItem
An item. Put its text in a TreeItemLabel and its children in a TreeGroup, which makes it a branch. Set branch for one whose children load later.
TreeItemCheckbox
The item's checkbox, with checkable. Screen readers hear the item's checked state instead.
TreeItemIndicator
The arrow that expands and collapses a branch. Alt or Option expands everything in it.
TreeItemLabel
The item's text, which names it. Render it as a link to make the item one.
TreeItems
Renders data items. Used by data trees, and available for custom layouts.

Props

Prop

Type

View UI SDK parts and state attributes.