Forms
Tree Select
A select that opens a tree panel to pick a node from a hierarchy. Arrow keys move through the tree, Enter selects, and Escape closes the panel.
ReactVueWeb Components
View in Storybook Playground
Examples
<TreeSelect
aria-label="カテゴリ"
nodes={categories}
placeholder="選択してください"
onChange={setCategory}
/> Props
| Name | Type | Default | Description |
|---|---|---|---|
nodes required | TreeNode[] | — | Tree data. |
value | string | string[] | null | — | Controlled selected node id(s). |
defaultValue | string | string[] | null | — | Initial selection when uncontrolled. @default null (single) / [] (multiple) |
onChange | (value: string | null) => void | — | Called with the selected id or id array. |
multiple | boolean | false | Allow selecting multiple nodes. @default false |
placeholder | string | — | Placeholder shown when nothing is selected. |
disabled | boolean | false | Disable the trigger. @default false |
size | 'sm' | 'md' | 'lg' | md | Control size. @default 'md' |
aria-label | string | — | Accessible label (when not inside a FormField). |
id | string | — | |
className | string | — |
Accessibility
- Body/background contrast is ≥ 7:1 (AAA) in both light and dark.
- Every interaction works with the keyboard alone.
- The focus ring is always visible.
- Respects prefers-reduced-motion and stops excessive motion.
Every component is designed to meet WCAG 2.1 AAA.