Skip to content

Cascader

Free

Pick a value from a tree of levels, such as region, country, and city. Go one level at a time or see columns, pick one or many, and search all levels.

  • Base UI
  • Motion
  • React 19
  • Tailwind CSS 4

Added Nov 11, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Pass the tree as items. Each node has a value, a label, and optional children. The value is always a string[].

city-picker.tsx

Cascader

PropTypeDefaultDescription
itemsRequired—The tree. Each node value is unique in the whole tree.
valuereadonly string[]—The picked values (controlled): leaves, or full branches with store="compact".
defaultValuereadonly string[]NO_VALUES
onValueChange—
multiplebooleanfalsePick many values, with a box on each row.
cascadebooleantrueMany values: a branch box takes every row under it (default true).
show"all""child""parent""parent"Many values: how a full branch shows as chips (default parent).
store"compact""leaves""leaves"leaves (default): the value holds leaves. compact: a full branch is its own value.
selectable"any""leaf""leaf"One value: leaf (default) picks only leaves; any lets Enter pick a branch too.
maxnumber—Many values: at most this many leaves.
mode"columns""drill""drill"drill (default): one level at a time. columns: the levels side by side, until the page (a popup) or the panel's own box (inline) is too narrow for two columns.
getChildrenCascaderGetChildren—Loads the rows of a branch with hasChildren.
onCreate—Shows an "Add" row when a search finds nothing.
openboolean—
defaultOpenbooleanfalse
onOpenChange—
inlinebooleanfalseNo popup: the panel sits in the page (Filters, a side panel).
disabledbooleanfalse
readOnlybooleanfalse
namestring—The form name: one hidden input per value.
formstring—
labels—
levelNamesreadonly string[]—The names of the levels by depth, for the column heads ("Region", "Country", "City").
localestring—The locale of counts and of the search (case and word rules).
childrenReactNode—

CascaderTrigger

PropTypeDefaultDescription
classNamestring—
size"default""lg""sm""default"
placeholderstring—The text while nothing is picked. Default: labels.placeholder.
display"leaf""path""path"One value: the whole path (default) or only the picked node.
aria-labelstring—
aria-labelledbystring—
aria-invalidboolean—
idstring—
clearablebooleanfalseShow a × that clears the value (the clearable field). It sits beside the trigger button, not in it: a button may not hold a button. className sizes the field box.
childrenReactNode—The value part. Default: a CascaderValue.

CascaderValue

<span>
PropTypeDefaultDescription
placeholderstring—
display"leaf""path""path"One value: the whole path (default) or only the picked node.
maxChipsnumber2Many values: chips before the "+N" chip (default 2).
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

CascaderContent

<div>
PropTypeDefaultDescription
classNamestring—
childrenReactNode—The panel. Default: a CascaderPanel.
container—The popup and the phone sheet: where they render (a portal into this element).
initialFocus—The popup and the phone sheet: what takes focus on open. Default: the search box.
finalFocus—The popup and the phone sheet: where focus goes on close.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

CascaderPanel

<div>
PropTypeDefaultDescription
classNamestring—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

CascaderSearch

<div>
PropTypeDefaultDescription
classNamestring—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

CascaderViewSwitch

<div>
PropTypeDefaultDescription
classNamestring—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

CascaderHeader

<div>
PropTypeDefaultDescription
classNamestring—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

CascaderLists

<div>
PropTypeDefaultDescription
classNamestring—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

CascaderFooter

<div>
PropTypeDefaultDescription
classNamestring—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.
  • Use it when the values form levels, such as Region, Country, and City.
  • Use mode to show one level at a time (drill) or levels side by side (columns).
  • Use multiple to pick many values, and max to limit them.
  • Use getChildren to load a level when it opens.
  • For a flat list with search, use a Combobox.
  • For a short flat list, use a Select.
  • For a tree that stays open on the page, use a Tree.
EnterorSpaceOn the trigger, opens the panel.
Up ArroworDown ArrowMoves the active row.
HomeorEndWith an empty search box, goes to the first or the last row.
EnterActs on the active row: opens a branch or picks a value.
Right ArrowWith the caret at the end of the text, opens the active branch. Right to left uses Left Arrow.
Left ArrowWith an empty search box, goes back one level. Right to left uses Right Arrow.
SpaceWith multiple and an empty search box, checks the active row.
BackspaceWith an empty search box, drops the branch scope, or removes the last pick.
EscapeClears the search. With an empty search box, closes the panel.
EnterorSpaceorDeleteorBackspaceIn the Selected view, removes the active pick.

Focus stays in the search box, and the active row moves through aria-activedescendant.

The arrow keys walk the rows and open or close a level. Enter picks a row.

Under 640px the surface is a bottom Drawer, and rows are large enough for a finger.

Open
popup · 150ms · ease-panel (0.2, 0.4, 0.2, 1) · fades in and scales from 95%
Close
popup-exit · 120ms · ease-out (0, 0, 0.2, 1)
  1. AddedCascader, with Animated Chevrons Up Down Icon, Button, Checkbox, Drawer, Highlight, Kbd, Popover, Segmented Control, Skeleton, Spinner.
Open the release