Content tree component setup

task brazil Updated Sep 10, 2026 5 min read content-tree-component-uib-setup.md
Raw file servicenow.com

The Content tree component combines and organizes data into an expandable and selectable tree structure. You can configure the tree structure to include options such as identifiers, highlighted values, chevrons, text, icons, and dividers.

Before you begin

This task assumes you have placed the component on the page and are ready to configure the properties and events. For instructions on accessing and using features in UI Builder, see Customize UI Builder pages using components.

Note: This document describes the latest component functionality. Go to the store to make sure you have the latest version of the component.

Role required: admin or ui_builder_admin

Procedure

  1. Define a label for your Content tree that differentiates it from other components in the Customize UI pages using components.

    A label makes finding the component easier in a large list of components. For instructions on using the content tree, see Manage UI pages and page variants.

    [Omitted image "content-tree-content-tree.png"] Alt text: Component with label displayed in the content tree

  2. Select the Content tree component, using one of these methods:

    • Click anywhere within the component.
    • Select the Content tree label you created for your component in the content tree. The property fields appear in the Config tab in the setup panel on the right.

Parent Topic:UIB Setup Information

Content tree component properties

Configure the appearance and features of the Content tree component.

To configure the properties, enter either static or dynamic input. Enter dynamic input by selecting the input type.

Field

Property

Description

Size

size

Size of tree item label and icon.

Selection

select

Behavior when a user clicks a selectable tree item. Choose from the following options.- single - only one tree item can be selected at a time

  • multi - multiple tree items can be selected at the same time
  • none - no tree items can be selected

Overflow

overflow

Behavior when tree items are too wide to fit in the space given to the tree. Choose from the following options.- scroll - the entire tree scrolls horizontally in its container

  • truncate - the item text is truncated to prevent side scrolling
  • wrap - the item text wraps over multiple lines to prevent side scrolling

Trigger icon

triggerIcon

Type of expand/collapse icon a parent item displays.

Highlight immediate parent

highlightSelectedParent

Option to highlight the parent of the current selection with a different highlight color.

Hide icons on default

showActionsOnHover

Option to show icons only on hover.

Show dividers

showDividers

Option to display a border on the bottom of each tree item.

Show presence pattern

showPresencePattern

Option to display an accessible presence icon with a pattern to make it distinguishable by a means other than color.

Items

items

Array of tree item objects that describe each item in the tree.

Expanded items

expandedItems

Array of path IDs that trace the path of the item from the root of the tree to the expanded item. A path ID is an array of string or numeric values.

Selected items

selectedItems

Array of path IDs that trace the path of the item from the root of the tree to the selected item. A path ID is an array of string or numeric values.

Loading items

loadingItems

Array of tree items that are actively being loaded or that have recently failed to load children from the server. The array contains a path ID, an optional error flag, and an error message.

Search item

searchTerm

Text value to search for and highlight in tree item labels. Matching is case-insensitive and applies to all occurrences within an item label.

ARIA properties

configAria

A JSON field for configuring ARIA properties, such as aria-braillelabel.

## Content tree component events

Select event handlers to configure the actions (events) provided with the Content tree component.

The Events tab shows the events used by the Content tree component. To view the available events, select + Add event mapping. Select the event in the list to add one or more event handlers.

Event handlers

Event handlers work with data resources to link the Content tree actions to the data you want to display to your users. Select the event in the list to add one or more event handlers.

For instructions on adding event handlers to an event, see Configure an event handler.

Event descriptions

Event Description
Content tree item selected Dispatched when the user selects an item on the content tree.
Content tree actionable item clicked Dispatched when the user clicks an actionable tree item label.
Content tree action clicked Dispatched when a user clicks a tree item action icon.
Content tree action mouseleave Dispatched when a user's mouse stops hovering over a tree item action icon.
Content tree action mouseenter Dispatched when a user's mouse hovers over a tree item action icon.
Content tree loading requested Dispatched when a user triggers loading of a parent item's children from the server.
Content tree loading cancelled Dispatched when a user cancels loading of a parent item's children from the server. Remove the item's path from the Loading items list even if it is currently in the error state. If the request can't be cancelled (such as it used fetch) and it succeeds later, then handle its response and add the children without re-expanding the item. If the request can't be cancelled and it fails later, then don't re-add the item to Loading items with an error message.
Content tree items set Dispatched when the Items property should be updated.
Content tree expanded items set Dispatched when the Expanded items property should be updated.
Content tree selected items set Dispatched when the Selected items property should be updated.
Search documentation
Search document titles and file paths on the brazil branch