Shadcn Cascader Controlled State
Controlled path, value, query and open state. Built by composing Button, Cascader, Cascader Item, Cascader Nav, Cascader Types. A free, open source shadcn cascader example you can install with npx shadcn@latest add @reui/c-cascader-9 and edit as your own code.
External buttons jump the panel to a level, reset it to the root and clear the selection, with all four controlled props printed under the control.
For AI Agents
Hand your agent this brief or the ReUI MCP, not a screenshot. Free to install.
Best for: A restaurant menu where outside code drives the open level and search text, and each commit reports its reason and full path
When to use
- Form fields that commit one value from a nested tree, such as a category, region, file or department
- Picking several nodes at once, such as permissions, report columns or shipping zones with cascading checks
- Deep or large hierarchies as Miller columns, an expanding tree, an inline panel or levels fetched on demand
When not to use
- A short flat list of options with no nesting: use the Select component
- A folder hierarchy browsed on the page rather than picked into a form field: use the Tree component
- A table of records whose cells are edited in place and saved together: use the Editing blocks
Agent notes
- Writing
valuefrom outside never firesonValueChange, so the Clear selection button setslastChangeby hand goToalso setsopen, because apathwritten while the popup is closed renders nothing- Parts live in separate files with no index:
CascaderItemscomes fromcascader-item, whileCascaderInputandCascaderValuecome fromcascader-nav - Give every node a
valuethat is unique across the whole tree, not only within its level; a repeatedvaluesilently drops the later row
https://reui.io/components/cascader/c-cascader-9.mdget_example("c-cascader-9")npx shadcn@latest add @reui/c-cascader-9About Shadcn Cascader Controlled State
Controlled path, value, query and open state. Built by composing Button, Cascader, Cascader Item, Cascader Nav, Cascader Types. A free, open source shadcn cascader example you can install with npx shadcn@latest add @reui/c-cascader-9 and edit as your own code.
What You Can Build With Shadcn Cascader Controlled State
- Composes Button, Cascader, so it drops into any project already using those components.
- Install it with the shadcn CLI: npx shadcn@latest add @reui/c-cascader-9
- Open source and free, with the full source on this page to copy or adapt.
More Shadcn Cascader Examples
- Attribute Picker Nested attribute picker with drill-down navigation.
- Multi-Select Cap Multi-select permissions with checkboxes and a selection cap.
- Deep Search Deep search across every level with path-annotated results.
- Footer Flyout Pinned footer with a side-anchored import flyout.
- Avatar Rows Custom rows with avatars and role badges.
- Path Formatting Trigger path formatting and collapsing.
- Embedded Panel Embedded panel without a popover.
- Flat Data Flat adjacency data with a parent pointer.
- Translated Labels Translated labels across a country picker.
- Two-Line Rows Two-line rows with descriptions and a disabled option.
- Native Form Field Form field that submits like a native input.
- Columns Mode Columns mode with independently scrolling panels.
Related Shadcn Component Categories
Open-source shadcn chart components for analytics dashboards, KPI tracking, and reports.
Open-source shadcn checkbox components for multi-select forms, settings preferences, and table selection.
Open-source shadcn code block components with Shiki syntax highlighting for AI chat, streaming agent output, diff review, and documentation.
Open-source shadcn collapsible components for expandable sections, detail rows, and progressive disclosure.
Open-source shadcn color picker components for brand settings, theme editors, label colors, and design tools.
Open-source shadcn combobox components for searchable selection, async lookup, and command menus.
Frequently Asked Questions
When should I use Shadcn Cascader Controlled State?
Use it for a restaurant menu where outside code drives the open level and search text, and each commit reports its reason and full path.
Shadcn Cascader as a whole fits:
- Form fields that commit one value from a nested tree, such as a category, region, file or department
- Picking several nodes at once, such as permissions, report columns or shipping zones with cascading checks
- Deep or large hierarchies as Miller columns, an expanding tree, an inline panel or levels fetched on demand
For a short flat list of options with no nesting, use the Select component. For a folder hierarchy browsed on the page rather than picked into a form field, use the Tree component. For a table of records whose cells are edited in place and saved together, use the Editing blocks.
How do I install Shadcn Cascader Controlled State?
Is Shadcn Cascader Controlled State free to use?
Which components does Shadcn Cascader Controlled State use?
Start building with ReUI Pro today.
Every Pro block, every style, and every future addition, with one license for unlimited projects.
From $249, once. Lifetime updates.