Trees are nestable, expandable text groups that can contain multiple links for navigation or items for filtering.
Overview
Trees can be used for filtering, navigation, and form selection. They organize items into hierarchical parent-child relationships. Parents can expand or collapse to show or hide nested items.
Sample
Usage
- Folder structures
- Data navigation
- Nested selection workflows
Component comparison
Tree and List both support structured selection, but serve different needs.
Best practices
Recommendations


Accessibility
Keyboard navigation
| Key | Function |
|---|---|
Arrow left | If the calcite-tree-item has children, all child elements will collapse. |
Arrow right | If the calcite-tree-item has children, all child elements will expand. |
Arrow up | Moves focus to the previous calcite-tree-item, including expanded child elements. If the current focus is the first calcite-tree-item, focus will not change. |
Arrow down | Moves focus to the next calcite-tree-item, including expanded child elements. If the current focus is the last calcite-tree-item, focus will not change. |
Home | Moves focus to the first calcite-tree-item. If the current focus is the first calcite-tree-item, focus will not change. |
End | Moves focus to the last calcite-tree-item. If the current focus is the last calcite-tree-item, focus will not change. |
Tab | Moves focus in and out of the component. |
Tab and Shift | Moves focus in and out of the component. |
Writing and copy


API reference
Properties
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
| lines | lines | When | boolean | false |
| scale | scale | Specifies the component's size. | Scale | "m" |
| selectedItems | Specifies the component's selected items. | TreeItem[] | ||
| selectionMode | selection-mode | Specifies the selection mode of the component, where:
| SelectionMode | "single" |
Slots
| Name | Description |
|---|---|
| default (unnamed) | A slot for |
Events
| Name | Description | Behavior |
|---|---|---|
| calciteTreeSelect | Fires when the user selects/deselects |
Methods
| Name | Description | Signature |
|---|---|---|
| componentOnReady | Creates a promise that resolves once the component is fully loaded. | componentOnReady(): Promise<this> |