Skip to content

Tree

File-style tree: branches fold, leaves select, lazy branches load; WAI-ARIA keys.

Group: Lists · Kind: macro · in the lite catalog

files
apps
web
main.ts
M
router.ts
packages
README.md
package.json
A
hasChildren · loading
apps
desktop
Loading
README.md
package.json
A

Open in the playground

The same specimen painted by React, SwiftUI, Compose and gpui.

exponential-ui-tree on Web
exponential-ui-tree on iOS
exponential-ui-tree on Android
exponential-ui-tree on Desktop
Prop Type Required Bindable Description
items [treeItem] yes – Root nodes.
expanded [string] – yes Open branch ids; bind it.
value string – yes Selected leaf id.
label string – – Accessible name.
  • on.select: runs an action
  • on.toggle: runs an action
  • on.load: runs an action

None.

none

No basic catalog component maps here.

Box · Icon · Row · Spinner

Role: tree

tree labelled label (else $string.tree); every node a treeitem with aria-level, aria-expanded on a branch, aria-selected; the loading row and the chevron are decorative

Keys Action
ArrowDown ArrowUp the next, previous visible node
Home End the first, last node
ArrowRight open a closed branch, else its first child
ArrowLeft close an open branch, else its parent
Enter Space select a leaf, fold a branch

Recipe parts: Tree/root Tree/row Tree/lead Tree/foldIcon Tree/spinner

Keyed by: open :hover :pressed :focus :disabled :checked :open :selected :invalid :dragover :warning :info

Themes · Write a theme

Icon · Row · Spinner · Sidebar · Section · Group · Trace · TraceItem