Tree (WIP)
tree functional composition and current verification limits.
Ordinary demos on this page explicitly use Shadcn Rhea, with matching examples. This does not change public compatibility defaults or imply complete browser, native-host or visual acceptance. Neutral Surface/Text atoms retain their own public semantics; the consumer composition supplies the family presentation theme.
Tree owns single selection and expansion of a complete authored hierarchy. nodeKey is unique, parentKey identifies its parent, and invalid cycles or missing parents fail closed. Arrow keys, Home/End and first-letter navigation move focus; Left/Right collapse, expand or navigate to parent/child. Controlled value and expandedKeys are request-only.
This is a WIP source checkpoint. Full Adapter/Compiler, native GPUI, package consumer, accessibility and commit-bound visual acceptance remain pending.
Shadcn Root and Item accept appearance="embedded" for file navigation inside an existing surface. Set it explicitly on both parts; the default appearance is unchanged. Embedded rows use a quiet selected surface, retain keyboard focus and disabled semantics, and wrap enlarged text. This is a family presentation option, not a new selection or expansion owner.
Tree is workspace source. There is no public proto-ui add target. Passing value or expandedKeys selects controlled mode for that fact.
| Prop | Type | Default |
|---|---|---|
defaultValue | string | '' |
defaultExpandedKeys | readonly string[] | [] |
disabled | boolean | false |
readOnly | boolean | false |
a11yLabel | string | Tree |
These props belong to Root. Item defaults nodeKey, parentKey, and textValue to '', and disabled to false. Group accepts nodeKey. Toggle adds the Button props.