Forms Form-associated
Cascader <pm-cascader>
Cascader: choose one item from nested lists, one column per level (country, region, city; category, subcategory).
Sizes
Set with the size attribute; controls keep touch-sized targets on phones.
size="sm"size="md"size="lg"States
Each state is one attribute.
DisabledRead-onlyRequiredErrorWith a hintOverview
Up and Down move within a column, Right opens the next level, Left goes back, Enter chooses. By default only the last level can be chosen; any-level lets a parent be the answer. Form-associated: submits the chosen value.
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
options | CascaderOption[] | [] | Nested options: { value, label, children? }. Values must be unique across all levels. |
value | string | — | Value of the chosen option. |
name | string | — | Form field name: the value is submitted under it. |
label | string | Choose | Visible label (use hide-label to hide it visually). |
placeholder | string | Select… | Shown while nothing is chosen. |
hint | string | — | Help text under the field. |
error | string | — | Custom error message. Setting it marks the field invalid. |
size | 'sm' | 'md' | 'lg' | — | Field size. |
required | boolean | false | The form cannot be submitted until a value is chosen. |
disabled | boolean | false | Not interactive and not submitted. |
any-levelprop: anyLevel | boolean | false | Let options that have children be chosen too (Enter or a second click). |
separator | string | / | Text between the levels in the field (default " / "). |
hide-labelprop: hideLabel | boolean | false | Hide the label visually; it stays the accessible name. |
readonly | boolean | false | Focusable and submitted, but the user cannot change the value. |
Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.
Events
| Event | React / Svelte prop | Description |
|---|---|---|
pm-change | onPmChange | A value was chosen or cleared. |
Methods
clear(), checkValidity(), reportValidity(), validate()