Pro
Cascader
Choose one item at the end of a path, with every level side by side so the way back is always in view. Pointing at an item opens its column; choosing a leaf closes the menu and the field shows the whole path.
pnpm dlx shadcn@latest add @caliper/cascaderWhen to use
Use it for
- Region › Country › City, Category › Type › Model, Folder › Subfolder.
- Deep but narrow hierarchies.
Skip it when
- Choosing many; use the tree select.
- Flat or searchable lists; use the combobox.
Decisions
Why it is built this way, so you know what to keep when you change your copy.
Behaviour
- Columns, not a drill
- Every level stays visible, which keeps the path readable and reversible.
- Narrow screens
- The columns scroll sideways so the newest is always in view.
Installation
pnpm dlx shadcn@latest add @caliper/cascader
Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage
Import it from your copy of the source. The example behind the preview comes with the source. It is built from Cascader and cascaderPath.
import { Cascader, cascaderPath } from "@/components/ui/cascader"
The worked example comes with Pro
The 46-line example behind the preview opens here, ready to copy.
- 576 Pro parts, blocks and page templates, all with source
- $199 once, with a year of updates. What you have stays yours
- A full refund within 14 days if it is not for you
API reference
Cascader
component
cascaderPath
component
No props of its own; it accepts the native props of its root element.
Accessibility
It exposes listbox and option semantics, with aria-label, aria-selected and aria-disabled kept in step with state.
Motion
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.
Related
- Tree selectChoose many things from a hierarchy in a field. Ticking a group ticks everything under it, a partly chosen group shows a dash, and the field shows as few chips as it can, so a whole department is one chip.
- Drill down menuA menu that goes deeper one level at a time: the next level slides in, Back slides it out, and the height eases to fit.
- ComboboxA searchable select with grouped options and keywords.