shadow
The Tree element allows hierarchical display of data in a tree structure. It is used to visualize categories, file systems or navigation structures. Tree contains wje-tree as the main container and wje-tree-item as the individual tree entries. Items can contain children, creating a nested hierarchy.
For deeper nesting levels (for example Deciduous -> Maple -> Field maple), indentation is applied continuously to each opened branch. This keeps level 3 and deeper items visually separated from their parent level.
Use wje-tree when users need to understand location, move between views, or traverse hierarchy.
Do not combine multiple competing navigation patterns for the same user flow.
Ensure visible active/selected states, predictable tab order, and clear control naming.
- Keep URL state and UI navigation state synchronized.
- Use consistent labels across menu, breadcrumbs, and tabs.
- Add context for deep structures (breadcrumbs, headings, icon cues).
No properties available for this component.
No events available for this component.
| Description | Retrieves all items that match the selector 'wje-tree-item' within the current context. |
| Signature | () => Array<Element> |
| Description | Retrieves and appends an expand/collapse icon to a given item based on the provided status. |
| Signature | (item: HTMLElement, status: string) => void |
| Description | Returns slots from the current component state. |
| Signature | (item: any, slotName: any) => void |
| Description | Updates the state of a checkbox, syncing the state both upwards to parent elements and downwards to child elements as necessary. |
| Signature | (changedItem: object, isInitialSync?: boolean) => void |
| Description | Updates the state of the parent item based on the state of its child items. Recursively propagates changes up to all parent items to reflect the selection or indeterminate state accurately. |
| Signature | (item: object) => void |
| Description | Propagates the state changes of an item upwards through its ancestors in the hierarchy. Calls the updateParentState method for each parent element until no parent exists. |
| Signature | (item: HTMLElement) => void |
| Description | Propagates the selected state of an item to its children recursively. Depending on the isInitialSync flag, it also determines how the state should be applied to the child items and updates the parent state if needed. |
| Signature | (item: object) => void |
| Name | Description |
|---|
native | The native container part of the tree. |
No CSS custom properties available for this component.
| Name | Description |
|---|
default | The default slot to place wje-tree-item child components. |