TreeSelect
v1.0.16NewUpdated 19 Oct 2026Select input whose popover is a checkable tree. Single mode is a radio-like leaf select; multiple mode adds tri-state parent checkboxes with a checkStrategy (all / parent / child) controlling which values are emitted. Se
Preview
Live · 13 stories▸Why this is recommendedtreeselecthierarchymulti-select+5
The default, out-of-the-box TreeSelect.
- ✓Category pickers (product / GL account trees)
- ✓Org-unit or department assignment
- ✓Warehouse-zone / location selection
- ✓Permission-scope pickers
- Single (radio-like leaf) and multiple (tri-state checkbox) modes
- checkStrategy: 'all' | 'parent' | 'child' controls emitted values
- Search filter keeps ancestor context and matched subtrees
- Chips in trigger with per-chip remove (multiple)
- Controlled + uncontrolled value, open state, default expansion
- ARIA tree pattern: roving tabindex, arrows / Space / Enter / Home / End
- Disabled nodes and branches skipped by parent toggles
- Trigger sizes sm / md / lg
- Labelled by FormField: id and aria-* land on the trigger button, the placeholder name steps aside, the popup tree is named by the same label, and the trigger fills the field column (standalone w-64)
- ✕Flat option lists (use Combobox / Select)
- ✕Browsing large hierarchies outside a form (use TreeView)
Install
Ask your agent, or call the MCP tool directly. The resolved bundle is written into your project.
Usage
Tick variants in the left menu — each adds a tab with that variant’s real story source, the same code the preview above renders.
Props
optionsRoot nodes ({ value, label, children?, disabled? })
yesmultipleTri-state checkbox mode
—valueControlled selection (leaf value single; values per checkStrategy multiple)
—onValueChangeSelection change callback
—checkStrategyWhich values are emitted for fully-checked subtrees (multiple, default child)
—defaultExpandedInitially expanded branch values
—sizeTrigger size
—aria-labelAccessible name of the trigger and tree; without it the placeholder names them, except inside a labelled FormField
—aria-labelledbyId(s) of the element(s) that label the trigger and tree; wins over a FormField label
—idDOM id set on the trigger button; FormField clones its field id in, and its label then names the control
—aria-describedbyId(s) of hint or error text describing the trigger (FormField clones this in)
—aria-invalidMark the trigger invalid; FormField clones this in from its error prop
—aria-requiredMark the trigger required; FormField clones this in from its required prop
—classNameClasses on the trigger; a width here wins over the default (w-full inside a FormField, w-64 otherwise)
—