Tree
A selectable application hierarchy with independent expansion and keyboard focus.
Preview
Project filesSelection is read only.
Use Tree
Tree is a named export of @flood-md/react. Connect the package once, then import what you use.
Design notes
- Tree uses tree/treeitem/group semantics, logical arrows, Home/End and typeahead. Moving focus does not select an item. Enter/Space explicitly selects; multiple selection does not cascade.
- Items have globally unique values. Expansion uses expandedValues/defaultExpandedValues/onExpandedValuesChange; selection uses value/defaultValue/onValueChange. Controlled refusal preserves the host state.
- Read-only allows browsing without selecting. Disabled items remain discoverable but cannot select or expand. hasChildren/loading represent host-owned deferred branches; no fetching or virtualization is built in.
- Application selection writes no form values. Use NavigationTree for ordinary native links. Introduced in 0.2.7.
API reference
View TypeScript source