(this page was created automatically. In case of formatting issues, please visit the official Wiki Page)

Tree View

Overview

Example Tree View

Specs

Tokens

Token Description
displayName Display name of the component in the structure panel
displayExpression Field from data shown as text in tree nodes
keyExpression Field used as unique identifier for each node
childrenExpression Field containing child items for each node
selectionMode Determines how users can select nodes
showCheckBoxesMode Controls how checkboxes are displayed
selectNodesRecursive Selects child nodes when parent is selected
selectByClick Enables or disables selection on click
paddingClass Configures padding around the component
dataSourceId ID of the data source for retrieving tree data
getEntityCollectionHttpRequestParametersMap Configures HTTP parameters for fetching data
events Configurable events for the component
ON_TREE_ITEM_CLICK (Events) Triggered when a node is clicked
ON_INIT (Events) Triggered when the component initializes
ON_DESTROY (Events) Triggered when the component is destroyed
visibilityPolicySetId Determines visibility based on policy sets
displayConditions Conditions for dynamically showing the component
id Unique identifier for programmatic access
dataTestId Testing hook ID for automated tests
enableAsHotspot Enables the component as a guided tour hotspot
guidedTourHotSpotTitle Title for guided tour hotspot (multi-language)
guidedTourHotSpotDescription Description for guided tour hotspot (multi-language)

Structure

Labeld Tree View with some more information

(Configured in General Properties)

(Configured in Visibility)

Data Allocation

(Configured in Visual Properties)

Datasource

(Configured in Datasource)

Styling

(Configured in Visual Properties)

Tree View without checkboxes

Actions & Variants

(Configured in Events)

Variants

(Configured in Visual Properties)

Tests

(Configured in Testing Hooks)

Authorization

(Configured in Authorization)

Links

Guidelines

Usage

Sizing & Layout

Visibility & Authorization

Content & Localization

Dos & Don’ts

Do Don’t Article setting(s)
Use stable unique keys for nodes. Use labels or array indices as identifiers. keyExpression
Map human-readable text to nodes. Surface internal IDs or verbose blobs as labels. displayExpression
Set selectionMode: "single" for navigation trees. Allow multi-select when only one target makes sense. selectionMode
Show checkboxes for multi-select tasks. Force multi-select without visible affordances. showCheckBoxesMode, selectionMode
Enable selectNodesRecursive for branch actions. Make users select every child manually. selectNodesRecursive
Require checkbox-only selection when precision matters. Allow row-click selection that causes accidental picks. selectByClick: false, showCheckBoxesMode
Hide the Tree View when not applicable. Leave an empty/irrelevant tree visible. displayConditions
Restrict sensitive trees by policy. Show structure and rely on downstream errors. visibilityPolicySetId

Accessibility

Datasource Requirements

The tree view component expects a hierarchical data structure or a flat structure that can be converted to a hierarchy.
Multiple level of the tree use a recursive structure.

Example format:

[
  {
    "id": "1",
    "name": "Electronics",
    "children": [
      {
        "id": "1-1",
        "name": "Smartphones",
        "children": []
      },
      {
        "id": "1-2",
        "name": "Laptops",
        "children": []
      }
    ]
  },
  {
    "id": "2",
    "name": "Clothing",
    "children": [
      {
        "id": "2-1",
        "name": "Men's",
        "children": []
      },
      {
        "id": "2-2",
        "name": "Women's",
        "children": []
      }
    ]
  }
]

With this data structure, you would set: