Tree
Tree component for displaying hierarchical data structures like file systems, navigation menus, or any nested content.
Examples
(7)Properties
(47)Playground
Basic Tree
Render a hierarchical dataset with collapsing branches. Use
indent to control how far each level is inset.Tree with Checkboxes
Enable
checkboxes with cascadeCheck to keep parent and child nodes synchronized while tracking checked ids.Tree Selection
Set
selectionMode to single or multiple and drive selectedIds from state. In multiple mode, shift-click captures a range and Cmd/Ctrl-click toggles one row.Tree Filtering
Provide
filterQuery with hideFiltered to search the tree. A highlight renderer and noResultsFallback are also available for custom match styling and empty states.Lazy Loading
Mark a node with
hasChildren and supply loadChildren to fetch a branch the first time it opens. The disclosure control shows a loader while the promise is in flight.Custom Tree Rendering
Pass
renderLabel to build custom rows with icons and badges while keeping the tree interactions intact.Virtualized Tree
Pass
virtualized with a height to render only the rows in view. Expansion animation is skipped in this mode; filtering, selection and keyboard navigation all still operate on the full row list.Scan to open this page on your phonereact-ui-library.com/components/Tree
</>
react-ui-library
100+ accessible, themeable components that work seamlessly across iOS, Android, and Web.
A Platform Blocks product.
Quick Links
Resources