For AI agents: the complete documentation index is available at https://wallarm.github.io/design-system/llms.txt, the full documentation bundle is available at https://wallarm.github.io/design-system/llms-full.txt, and this page is available as Markdown at https://wallarm.github.io/design-system/components/tree.md.

Tree

Draws structure: a vertical rail and depth indentation around nested content, with optional per-item collapse. It shows a hierarchy rather than letting you work in one — reach for TreeView when rows need selecting, keyboard navigation or disabled states, and for Accordion when the levels are sections rather than a tree.

Source · Storybook

Usage

import { Tree, TreeItem, TreeItemHeader } from '@wallarm-org/design-system/Tree';

Examples

Nested

Nesting a Tree inside an item adds a depth, and each depth draws its own rail so the ancestry stays readable.

With icons

TreeItemHeader’s icon prop sits before the label at every depth, which is how a status or a type reads down a branch.

With icons nested

The same icons four levels deep — the case that shows whether the indentation is still legible at depth.

Collapsible

collapsible on an item turns its header into a toggle, open by default. It is per item, not a tree-wide setting.

Collapsible with actions

TreeItemHeader’s action slot holds a control on the right of the row, which is where a per-branch action belongs.

Props

PropTypeDefaultDescription
indentnumber | undefined
gapnumber | undefined
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
titlestring | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined
data-testidstring | undefined

TreeItem

PropTypeDefaultDescription
collapsibleboolean | undefinedfalse
openboolean | undefined
defaultOpenboolean | undefinedtrue
onOpenChange((open: boolean) => void) | undefined
titlestring | undefined
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined

TreeItemContent

PropTypeDefaultDescription
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
titlestring | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined

TreeItemHeader

PropTypeDefaultDescription
iconReactNode
actionReactNode
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
titlestring | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined