Skip to content

Cascade Select

Choose a leaf value by moving through progressive hierarchy columns.

Usage

Location

Choose a location progressively from country to city.

Choose a location progressively from country to city.

Disabled

Remove the control from keyboard and pointer interaction.

Remove the control from keyboard and pointer interaction.

Controlled

Let the parent own the current value and apply accepted changes back to the component.

Let the parent own the current value and apply accepted changes back to the component.

Floating positioning

This component uses the shared positioning engine. Use the live positioning example to change side, align, offsets, collision boundaries, strategy, and tracking while inspecting the resolved placement.

API

Vue package: @sectile/vue/cascade-select

Components
  • CascadeSelectRoot
  • CascadeSelectTrigger
  • CascadeSelectValue
  • CascadeSelectContent
  • CascadeSelectColumn
  • CascadeSelectItem
  • CascadeSelectItemIndicator
  • CascadeSelectItemChevron

Props

CascadeSelectRootProps

align

Alignment of positioned content relative to its anchor.

as

Element or component rendered for this part.

asChild

Whether to merge this part into its single child instead of rendering a wrapper.

avoidCollisions

Whether positioned content may flip or shift to remain visible.

collisionBoundary

Boundary used to keep positioned content visible.

collisionPadding

Space kept between positioned content and its collision boundary.

defaultOpen

Initial uncontrolled open state.

defaultValue

Initial value used when the component owns its state.

disabled

Whether interaction is unavailable.

disabledItems

Item values excluded from focus and selection.

form

ID of the native form associated with the control.

hideWhenDetached

Whether positioned content hides when its anchor leaves the layout.

label

Accessible name announced for the control.

modelValue

Current value when state is controlled by the parent.

name

Name used for native form submission.

nodes

Flat hierarchy used to build the tree.

open

Whether the associated popup or disclosure is open.

policies

Behavior policies that customize validation, movement, or selection.

position

Whether the popup is positioned relative to its trigger.

readonly

Whether the value can be inspected but not changed.

required

Whether the control must contain a valid value before submission.

side

Preferred side of the anchor for positioned content.

sideOffset

Distance between positioned content and its anchor.

strategy

CSS positioning strategy used for anchored content.

textValue

Returns searchable or presentational text for an item value.

tracking

Update strategy used while anchored content is open.

CascadeSelectColumnProps

as

Element or component rendered for this part.

asChild

Whether to merge this part into its single child instead of rendering a wrapper.

depth

Zero-based depth of this column in a cascading selection.

label

Accessible name announced for the control.

CascadeSelectItemProps

as

Element or component rendered for this part.

asChild

Whether to merge this part into its single child instead of rendering a wrapper.

disabled

Whether interaction is unavailable.

value

Current value exposed by this contract.

CascadeSelectPartProps

as

Element or component rendered for this part.

asChild

Whether to merge this part into its single child instead of rendering a wrapper.

Slots

CascadeSelectRootSlotProps

columns

Visible cascade hierarchy columns.

disabled

Whether interaction is unavailable.

highlightedValue

Value currently highlighted for interaction.

open

Whether the associated popup or disclosure is open.

path

Current selected path.

readonly

Whether the value can be inspected but not changed.

value

Current value exposed by this contract.

valuePath

Current selected values from root to leaf.

CascadeSelectColumnSlotProps

depth

Depth of the current hierarchical item.

items

Current derived item collection.

parentValue

Value that owns the current cascade column.

CascadeSelectItemSlotProps

branch

Whether this item owns descendants.

disabled

Whether interaction is unavailable.

expanded

Whether descendants are visible.

highlighted

Whether this item is highlighted for interaction.

selected

Whether this item is selected.

value

Current value exposed by this contract.

Events

CascadeSelectRoot

highlight

Emitted when the highlighted item changes.

update:modelValue

Emitted when the component requests a new controlled value.

update:open

Emitted when the component requests a new open state.

Other types

CascadeSelectTextValueResolver

ts
type CascadeSelectTextValueResolver = NonNullable<CascadeSelectRootProps['textValue']>

CascadeSelectValueChangeHandler

ts
type CascadeSelectValueChangeHandler = (value: string | null) => void

CascadeSelectOpenChangeHandler

ts
type CascadeSelectOpenChangeHandler = (value: boolean) => void

CascadeSelectHighlightHandler

ts
type CascadeSelectHighlightHandler = (value: string | null) => void

Parts

Shared scope: [data-scope="cascade-select"]. Combine it with a part selector to keep styles local to this component.

PartSelectorRoleExtra attributes
root[data-part="root"]Defines the component boundary and owns its composed parts.
trigger[data-part="trigger"]Opens, closes, or activates the associated content.
value[data-part="value"]Displays the current committed value.
content[data-part="content"]Contains the component content shown for the active state.
column[data-part="column"]Groups one level of hierarchical choices.
item[data-part="item"]Represents one selectable or actionable item.
item-indicator[data-part="item-indicator"]Shows the item selection state.
item-chevron[data-part="item-chevron"]Shows that an item opens a deeper level.

Keyboard interaction

KeyBehavior
Arrow keysMove the active option in the visible orientation.
Home / EndMove to the first or last eligible option.
Enter / SpaceSelect or activate the current option.
Printable textMove to the next matching option when typeahead is available.

Accessibility

Each visible column is a labeled listbox; options expose selection, branch, and disabled state.

Released under the MIT License.