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

Tree View

Link to Figma: tba

Overview

[IMAGE PLACEHOLDER: Tree View showing collapsed and expanded parent-child nodes]

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

Data Allocation

(Configured in Visual Properties)

Datasource

(Configured in Datasource)

[IMAGE PLACEHOLDER: Tree View structure with parent-child nodes, display conditions, event handling, and mapped fields]

Styling

(Configured in General Properties)

(Configured in Visual Properties)

[IMAGE PLACEHOLDER: Tree View with display name, checkboxes, and padding highlighted]

Actions & Variants

(Configured in Events)

Variants

(Configured in Visual Properties)

[IMAGE PLACEHOLDER: Tree View showing selection variants with single, multiple, recursive selection, and click behavior]

Tests

(Configured in Testing Hooks)

Authorization

(Configured in Authorization)

Guidelines

Data Format

The tree view component expects a hierarchical data structure or a flat structure that can be converted to a hierarchy.

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:

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
Filter at the source to limit payload. Fetch unbounded datasets without parameters. getEntityCollectionHttpRequestParametersMap, dataSourceId
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
Provide stable test hooks. Target nodes by transient text in tests. dataTestId, id

Accessibility