sheengemologic ui
All components

TreeItem

A stable leaf or retained branch within a Tree.@gemologic/sheen · navigation

Playground

This example has no scalar controls. Its validated source remains interactive below.
<Tree label="Files"><TreeItem value="src" label="Source"><TreeItem value="index" label="index.ts" /></TreeItem></Tree>

Variant matrix

Retained branch

Anatomy

Package
@gemologic/sheen
Source
packages/ui/src/primitives/Tree.tsx
Tokens
  • --sheen-color-fg
  • --sheen-color-bg-hover
  • --sheen-color-focus-ring
  • --sheen-space-inline-sm

Accessibility

Role: treeitemKeyboard: ArrowDown, ArrowUp, ArrowRight, ArrowLeft, Enter, Space

Do

  • Keep each value stable across background refresh and reordering.

Do not

  • Do not put unrelated interactive controls inside an item label.

Generated props

NameTypeDefaultDescription
value *stringRequired stable identity, unique within the owning tree.
label *stringRequired visible and accessible item label.
disabledbooleanfalseKeeps the item focusable while preventing selection, activation, and expansion.
childrenJSX.ElementNested TreeItems; providing children makes this item an expandable branch.
Native Solid/HTML attributes remain available and are omitted from this authored-prop view.