Cascader
@rockshin/tao-uiChoose complete paths through hierarchical options with search, multiple selection and a standalone panel.
Each example can be copied and run independently. Use the device control on framed previews to switch between desktop and phone widths.
Sizes are small, medium and large; the compatible middle alias uses the same dimensions as medium.
Below 576px, Cascader automatically uses a bottom drawer. Use mobile to override the surface and mobileTitle to name the drawer. Mobile single selection commits immediately; multiple selection commits on Done and cancels on dismissal. On desktop, the clear action replaces the arrow on hover; touch keeps clear visible.
Examples
Choose a complete path
The selected value contains each level in the chosen path.
Controlled path and display
displayRender can shorten the displayed path while preserving every value in state.
asia / japan / tokyo
Select multiple paths
Multiple mode adds linked checkboxes. SHOW_CHILD keeps leaf paths in the visible selection.
Search every level
The search filter checks every label in a path. Selecting a result returns the full path.
Choose intermediate levels
changeOnSelect allows a parent path to be selected. This example expands columns on pointer hover.
Map custom fields
Field names let existing domain data remain unchanged.
Load columns on demand
The local delay stands in for a data request. Mark unresolved parents with isLeaf:false and update options after loading.
Use the standalone panel
Cascader.Panel keeps the columns visible without a trigger input.
Mobile bottom drawer
Choose a three-level path in a bottom drawer on phones. The columns scroll horizontally when the path exceeds the available width.
Single selection applies as soon as the user picks a path. With multiple, changes in the drawer apply when the user taps Done. Since 0.0.49, Cascader skips newly chosen paths that are removed or disabled before confirmation, while keeping previously committed paths that the user has left selected.