Tree
<ui5-tree>
| Since 1.0.0-rc.8The ui5-tree
component provides a tree structure for displaying data in a hierarchy.
Usage​
When to use:​
- To display hierarchically structured items.
- To select one or more items out of a set of hierarchically structured items.
When not to use:​
- To display items not hierarchically structured. In this case, use the List component.
- To select one item from a very small number of non-hierarchical items. Select or ComboBox might be more appropriate.
- The hierarchy turns out to have only two levels. In this case, use List with group items.
Keyboard Handling​
The ui5-tree
provides advanced keyboard handling.
The user can use the following keyboard shortcuts in order to navigate trough the tree:
- [Up] or [Down] - Navigates up and down the tree items that are currently visible.
- [Right] - Drills down the tree by expanding the tree nodes.
- [Left] - Goes up the tree and collapses the tree nodes.
The user can use the following keyboard shortcuts to perform selection,
when the selectionMode
property is in use:
- [Space] - Selects the currently focused item upon keyup.
- [Enter] - Selects the currently focused item upon keydown.
ES6 Module Import​
import "@ui5/webcomponents/dist/Tree.js";
import "@ui5/webcomponents/dist/TreeItem.js";