Skip to main content

Tree

SpeedSearchTree

ItemLayout

While you can render any custom content in Items of a tree, ItemLayout is a useful helper component implementing the most common cases. Render different parts of an item, such as icon, text, etc. inside a ItemLayout and it handles the layout, and the spacing between them. Some common parts that require a special style are implemented as components accessible on ItemLayout.

Result
Loading...
Live Editor

Context Menu

In order to have context menu for tree nodes, just wrap the tree in a ContextMenuContainer. When the context menu is triggered on an item, the selection is also updated right before the context menu opens, so you can render the context menu based on the selected tree node(s).

Result
Loading...
Live Editor

Advanced use

Custom list component with useList and useSpeedSearchList