Skip to content

Cascader

InputsSince 0.13.0

Selects a node in a hierarchy through cascading columns: country > state > city, division > department > team, category > subcategory. The trigger is a select-only combobox whose popup is a non-modal dialog with a search box and one listbox per level. Children can load lazily (loadChildren) with a loading state, abort, and retry. Search lists the matching paths of every loaded node. Single or multiple selection; the trigger shows the selected path. Cascader is a Form control: it validates, serializes, and resets with Form, and native forms receive the selected leaf values.

  • Cascading levelsOne named listbox per level, from country to state to city.
  • Lazy childrenLoad a level when it opens, with a loading state, abort on close, and retry.
  • Search across levelsType to list matching paths such as India / Karnataka / Bengaluru.
  • Single or multipleOne path in the trigger, or several as removable chips; any level with changeOnSelect.
  • Keyboard completeArrows within and between levels, reading-direction aware, Escape to close.

Use it for

  • Locations, organization units, product categories: hierarchies of two to five levels where each level narrows the next.
  • Large hierarchies loaded level by level from a server.

Use something else for

  • A flat list: use Select or Combobox.
  • Deep or irregular trees where users need to see the whole structure: use a tree view.
  • Two levels with few options: two dependent Selects are simpler.
Anatomy
<div class="aui-field aui-cascader [--multiple]">
<label class="aui-field__label" for="trigger">Work location</label>
<div class="aui-cascader__control">
<button class="aui-cascader__trigger" role="combobox" aria-haspopup="dialog" aria-expanded aria-controls="popup" aria-labelledby="label text">
<span class="aui-cascader__text">India / Karnataka / Bengaluru</span><span class="aui-cascader__caret">(chevron)</span>
</button>
<button class="aui-cascader__clear" aria-label="Clear selection"></button>
</div>
<ul class="aui-cascader__chips"><li class="aui-cascader__chip">path <button class="aui-cascader__chip-remove" aria-label="Remove path"></button></li></ul> (multiple)
<div class="aui-field__description">help</div>
<div class="aui-field__error">error</div>
<div class="aui-cascader__popup" role="dialog" popover="manual" aria-labelledby="label">
<input type="search" class="aui-cascader__search" aria-label="Search">
<div class="aui-cascader__columns">
<div class="aui-cascader__column">
<ul class="aui-cascader__list" role="listbox" aria-label="Country" aria-activedescendant>
<li class="aui-cascader__option" role="option" aria-selected>India<span class="aui-visually-hidden">, has more levels</span>(chevron)</li>
</ul>
<div class="aui-cascader__status" role="status">Loading... | Could not load options. <button>Retry</button></div>
</div>
... one column per open level
</div>
<div class="aui-cascader__results" hidden><ul role="listbox">paths</ul><div role="status">3 results</div></div>
</div>
<div hidden><input type="hidden" name="city" value="blr"></div>
</div>

Use the bar above each frame to switch theme, density, direction, and locale.

Cascader in the Personal preferences showcase

Section titled “Cascader in the Personal preferences showcase”

The part of the Personal preferences showcase that uses Cascader. Change its options, use it with the keyboard, and watch the event log; the link in the frame opens the full showcase. The bar above the frame switches theme, density, direction, and locale.

Showcase source
// Preferences showcase: a personal settings page with the new form controls. An accent
// color with swatches, a contrast hint, and the eyedropper where supported; a satisfaction rating
// with half steps; team assignment between two searchable lists (with drag); a work location
// cascader whose cities load from a simulated server; a mention comment box with @people and
// #tags from a simulated directory; a masked phone number; and an acknowledgement signature.
import { Cascader, type CascaderOption, type CascaderValue } from '@absoluteui/components/cascader';
import { ColorPicker } from '@absoluteui/components/color-picker';
import { MaskedInput, MASK_PRESETS } from '@absoluteui/components/masked-input';
import { MentionInput, type MentionSuggestion } from '@absoluteui/components/mention-input';
import { Rating } from '@absoluteui/components/rating';
import { SignaturePad } from '@absoluteui/components/signature-pad';
import { TransferList, type TransferListItem } from '@absoluteui/components/transfer-list';
import { action, choice, createShowcase, hostIn, section, status, toggle, wait } from './kit.js';
const sc = createShowcase({
title: 'Personal preferences',
description: 'Pick an accent color, rate onboarding, choose your team and location, leave a comment with mentions, and sign.',
simulated: true,
});
// Appearance: color.
const appearance = section(sc, 'Appearance', ['color-picker']);
const color = ColorPicker.create(hostIn(appearance), {
label: 'Accent color',
description: 'Used for your calendar entries and highlights.',
value: '#2563eb',
presets: [
{ value: '#2563eb', label: 'Blue' },
{ value: '#15803d', label: 'Green' },
{ value: '#b45309', label: 'Amber' },
{ value: '#b91c1c', label: 'Red' },
{ value: '#7c3aed', label: 'Violet' },
],
recent: ['#0f766e', '#be185d'],
contrastWith: '#ffffff',
name: 'accent',
});
sc.listen(color.host, ['aui-change'], 'color');
// Feedback: rating.
const feedback = section(sc, 'Feedback', ['rating']);
const rating = Rating.create(hostIn(feedback), {
label: 'How was your onboarding?',
allowHalf: true,
value: 4,
labels: ['Poor', 'Fair', 'Good', 'Very good', 'Excellent'],
name: 'onboarding',
});
sc.listen(rating.host, ['aui-change'], 'rating');
Rating.create(hostIn(feedback), { label: 'Team average', value: 4.5, allowHalf: true, display: true, size: 'sm' });
// Team: transfer list over a realistic directory size.
const team = section(sc, 'Team', ['transfer-list']);
const FIRST = ['Ana', 'Ben', 'Chen', 'Divya', 'Elif', 'Farah', 'Goran', 'Hana', 'Ivan', 'Jun', 'Kofi', 'Lena', 'Mateo', 'Nora', 'Omar', 'Priya'];
const LAST = ['Ruiz', 'Okafor', 'Wang', 'Iyer', 'Kaya', 'Haddad', 'Petrov', 'Sato', 'Novak', 'Kim', 'Mensah', 'Fischer', 'Silva', 'Berg', 'Aziz', 'Rao'];
const people: TransferListItem[] = [];
for (let i = 0; i < 240; i++) {
const name = `${FIRST[i % FIRST.length] ?? ''} ${LAST[Math.floor(i / FIRST.length) % LAST.length] ?? ''}`;
people.push({ value: `p${String(i)}`, label: name, description: ['Engineering', 'Finance', 'People', 'Sales'][i % 4] ?? '', ...(i % 37 === 5 ? { disabled: true } : {}) });
}
const transfer = TransferList.create(hostIn(team), { label: 'Project team', items: people, value: ['p1', 'p2'], draggable: true, maxSelected: 12, name: 'team' });
sc.listen(transfer.host, ['aui-change'], 'team');
// Location: lazy cascader.
const location = section(sc, 'Work location', ['cascader']);
const CITIES: Record<string, string[]> = {
'de/by': ['Munich', 'Nuremberg', 'Augsburg'],
'de/be': ['Berlin'],
'in/ka': ['Bengaluru', 'Mysuru'],
'in/mh': ['Mumbai', 'Pune'],
'us/ca': ['San Francisco', 'Los Angeles', 'San Diego'],
'us/ny': ['New York', 'Buffalo'],
};
const places: CascaderOption[] = [
{ value: 'de', label: 'Germany', children: [{ value: 'by', label: 'Bavaria' }, { value: 'be', label: 'Berlin' }] },
{ value: 'in', label: 'India', children: [{ value: 'ka', label: 'Karnataka' }, { value: 'mh', label: 'Maharashtra' }] },
{ value: 'us', label: 'United States', children: [{ value: 'ca', label: 'California' }, { value: 'ny', label: 'New York' }] },
];
const cascader = Cascader.create(hostIn(location), {
label: 'Office',
options: places,
value: ['de', 'by', 'munich'],
levelLabels: ['Country', 'State', 'City'],
name: 'office',
loadChildren: async (_option, { signal, path }) => {
await wait(500, signal);
sc.log('server answered', { path });
return (CITIES[path.join('/')] ?? []).map((city) => ({ value: city.toLowerCase().replace(/\s+/g, '-'), label: city, isLeaf: true }));
},
});
sc.listen(cascader.host, ['aui-change'], 'cascader');
// Comment: mentions from a simulated directory.
const comment = section(sc, 'Comment', ['mention-input']);
const TAGS = ['onboarding', 'payroll', 'benefits', 'equipment', 'training'];
const findPeople = async (query: string, signal: AbortSignal): Promise<MentionSuggestion[]> => {
await wait(250, signal);
const q = query.toLowerCase();
return people.filter((p) => p.label.toLowerCase().includes(q)).slice(0, 8).map((p) => ({ id: p.value, label: p.label, description: p.description ?? '' }));
};
const mention = MentionInput.create(hostIn(comment), {
label: 'Note for your manager',
description: 'Type @ to mention a colleague or # to add a topic.',
maxLength: 500,
showCounter: true,
name: 'note',
triggers: [
{ char: '@', label: '@ for people', provider: (query, { signal }) => findPeople(query, signal) },
{ char: '#', label: '# for topics', provider: async (query, { signal }) => {
await wait(150, signal);
return TAGS.filter((t) => t.startsWith(query.toLowerCase())).map((t) => ({ id: t, label: t }));
} },
],
});
sc.listen(mention.host, ['aui-change', 'aui-mention'], 'mention');
// Contact: masked phone number.
const contact = section(sc, 'Contact', ['masked-input']);
const phone = MaskedInput.create(hostIn(contact), { label: 'Mobile phone', name: 'phone', ...MASK_PRESETS.phoneUs });
sc.listen(phone.host, ['aui-change'], 'phone');
// Acknowledgement: signature.
const sign = section(sc, 'Acknowledgement', ['signature-pad']);
const signature = SignaturePad.create(hostIn(sign), { label: 'Signature', description: 'Draw your signature, or choose Type to enter your full name.', required: true, name: 'signature' });
sc.listen(signature.host, ['aui-change'], 'signature');
const summary = status(sign);
const summarize = (): void => {
const v = signature.value;
summary.textContent = v === null ? 'Not signed yet.' : v.mode === 'type' ? `Signed as ${v.text}.` : `Signed with ${String(v.strokes.length)} strokes.`;
};
signature.host.addEventListener('aui-change', summarize);
summarize();
// Options.
const controls = [color, rating, transfer, cascader, mention, phone, signature];
toggle(sc, 'Disabled', false, (disabled) => {
for (const c of controls) c.update({ disabled });
});
toggle(sc, 'Read-only', false, (readOnly) => {
for (const c of controls) c.update({ readOnly });
});
choice(
sc,
'Color picker',
[
{ value: 'popup', label: 'Popup' },
{ value: 'inline', label: 'Inline' },
],
'popup',
(mode) => {
color.update({ mode });
},
['color-picker'],
);
toggle(sc, 'Half stars', true, (allowHalf) => {
rating.update({ allowHalf });
}, ['rating']);
/** A single path (strings), as opposed to a list of paths. */
const isPath = (v: CascaderValue): v is readonly string[] => v?.every((part) => typeof part === 'string') === true;
toggle(sc, 'Several offices', false, (multiple) => {
const current = cascader.value;
cascader.update({ multiple, value: multiple ? (isPath(current) ? [current] : []) : null });
}, ['cascader']);
action(sc, 'Validate', () => {
const invalid = controls.filter((c) => !c.reportValidity());
sc.log('validate', { invalid: invalid.map((c) => c.label) });
});
action(sc, 'Reset', () => {
for (const c of controls) c.reset();
summarize();
sc.log('reset');
});
import { Cascader, type CascaderValueDetail } from '@absoluteui/components/cascader';
const host = document.createElement('div');
const summary = document.createElement('p');
document.body.append(host, summary);
Cascader.create(host, {
label: 'Work location',
name: 'city',
required: true,
levelLabels: ['Country', 'State', 'City'],
options: [
{ value: 'in', label: 'India', children: [
{ value: 'ka', label: 'Karnataka', children: [{ value: 'blr', label: 'Bengaluru' }, { value: 'mys', label: 'Mysuru' }] },
{ value: 'kl', label: 'Kerala', children: [{ value: 'cok', label: 'Kochi' }] },
] },
{ value: 'de', label: 'Germany', children: [
{ value: 'be', label: 'Berlin', children: [{ value: 'ber', label: 'Berlin' }] },
] },
],
value: ['in', 'ka', 'blr'],
});
host.addEventListener('aui-change', (event) => {
const { labels } = (event as CustomEvent<CascaderValueDetail>).detail;
summary.textContent = Array.isArray(labels) ? labels.join(' > ') : 'No location';
});
import { Cascader, type CascaderOption } from '@absoluteui/components/cascader';
const host = document.createElement('div');
document.body.append(host);
Cascader.create(host, {
label: 'Department',
levelLabels: ['Division', 'Department', 'Team'],
options: [{ value: 'ops', label: 'Operations' }, { value: 'eng', label: 'Engineering' }],
loadChildren: async (option, { signal, path }): Promise<CascaderOption[]> => {
const response = await fetch(`/api/org/${path.map(encodeURIComponent).join('/')}`, { signal });
if (!response.ok) throw new Error(`HTTP ${String(response.status)}`);
const rows = (await response.json()) as { id: string; name: string; leaf: boolean }[];
return rows.map((r) => ({ value: r.id, label: r.name, isLeaf: r.leaf || path.length >= 2 }));
},
});
import { Cascader } from '@absoluteui/components/cascader';
const host = document.createElement('div');
document.body.append(host);
Cascader.create(host, {
label: 'Product categories',
multiple: true,
changeOnSelect: true,
options: [
{ value: 'hw', label: 'Hardware', children: [{ value: 'laptops', label: 'Laptops' }, { value: 'monitors', label: 'Monitors' }] },
{ value: 'sw', label: 'Software', children: [{ value: 'licenses', label: 'Licenses' }] },
],
value: [['hw', 'laptops'], ['sw']],
});
Terminal window
npm install @absoluteui/components @absoluteui/core @absoluteui/theme

Registry setup, the theme stylesheet, and the Content Security Policy are covered in Installation.

import { Cascader } from '@absoluteui/components/cascader';
import '@absoluteui/components/cascader/style.css';
import { Cascader } from '@absoluteui/components/cascader';
import '@absoluteui/components/cascader/style.css';
const host = document.querySelector<HTMLElement>('#location');
if (host) {
Cascader.create(host, {
label: 'Location',
name: 'city',
levelLabels: ['Country', 'City'],
options: [
{ value: 'in', label: 'India', children: [{ value: 'blr', label: 'Bengaluru' }, { value: 'pnq', label: 'Pune' }] },
{ value: 'uk', label: 'United Kingdom', children: [{ value: 'lon', label: 'London' }] },
],
});
}
More usage
import { Cascader } from '@absoluteui/components/cascader';
const host = document.querySelector<HTMLElement>('#category');
if (host) {
Cascader.create(host, {
label: 'Expense category',
levelLabels: ['Group', 'Category'],
options: [
{ value: 'travel', label: 'Travel', children: [{ value: 'air', label: 'Air fare' }, { value: 'hotel', label: 'Hotel' }] },
{ value: 'office', label: 'Office', children: [{ value: 'supplies', label: 'Supplies' }] },
],
});
}

Using Angular? See Cascader for Angular.

Cascader.create(host: HTMLElement, options: CascaderOptions): Cascader

Global configuration key: cascader (see Configuration).

Option Type Default Description
label string Visible label; names the trigger and the popup. Required.
hideLabel boolean "false" Visually hide the label.
description string Help text, referenced by the trigger.
options readonly CascaderOption[] The tree { value, label, children?, isLeaf?, disabled? }; sibling values are unique. Required.
value CascaderValue A path of values (or null); a list of paths with multiple.
multiple boolean "false" Select several paths, shown as removable chips.
changeOnSelect boolean "false" Any node can be selected, not only leaves.
loadChildren (option: CascaderOption, context: CascaderLoadContext) => Promise<readonly CascaderOption[]> Loads a node’s children when it opens; aborted when the popup closes.
searchable boolean "true" Show a search box in the popup.
maxResults number "50" Maximum search results (1 to 1000).
levelLabels readonly string[] Accessible names of the levels (default Level 1, Level 2, …).
placeholder string Trigger text when nothing is selected (default Select).
clearable boolean "true" Show a clear button for a single selection that is not required.
name string Form field name: one hidden input per path with its leaf value.
required boolean "false" A selection is required.
disabled boolean "false" Disable the control.
readOnly boolean "false" Show the value; the popup does not open.
validate (value: CascaderValue) => string | null Consumer validation; return a message to mark the value invalid.
icons Partial<CascaderIcons> Icon overrides.
validationTiming 'blur' | 'input' | 'submit' "blur" When validation messages appear. Globally configurable.
locale string "en-US" Locale of messages and search matching. Globally configurable. Inherited from common configuration.
direction 'ltr' | 'rtl' "ltr" Reading direction for arrow keys and popup alignment. Globally configurable. Inherited from common configuration.
Property Type Description
host HTMLElement The host element.
trigger HTMLButtonElement The trigger button.
value CascaderValue A path or null; a list of paths with multiple (copies).
open boolean Whether the popup is open.
validity FieldValidity Current validity.
dirty boolean The value differs from the initial value.
touched boolean Focus has left the control once.
options Readonly<CascaderOptions> Current options.
Method Description
setValue(value: CascaderValue): void Set the value (no event).
show(): void Open the popup and focus the search box (or the first level).
close(restoreFocus?: boolean): void Close the popup; pending loads are aborted.
getFormValue(): string | string[] | null Leaf values for Form serialization.
reportValidity(): boolean Show messages now and return validity.
setCustomError(message: string | null): void Show or clear an external error.
focus(): void Focus the trigger.
reset(): void Restore the initial value and clear messages.
update(options: Partial<CascaderOptions>): void Merge and apply options; an invalid update leaves the previous state.
destroy(): void Close, abort loads, remove rendering, listeners, and the form registration.
Event Detail Bubbles Cancelable Description
aui-change CascaderValueDetail Yes No The selection changed: { value, labels, validity }.
aui-open null No No The popup opened.
aui-close null No No The popup closed.

All rules live in the aui.components cascade layer, so application styles override them without specificity battles.

Class Purpose
aui-cascader Host (with aui-field).
aui-cascader--multiple | --disabled | --invalid State modifiers.
aui-cascader__control | __trigger | __text | __text--placeholder | __caret The trigger and its parts.
aui-cascader__clear Clear button.
aui-cascader__chips | __chip | __chip-remove Selected paths with multiple.
aui-cascader__popup The popup (role=dialog, top layer).
aui-cascader__search Search box.
aui-cascader__columns | __column | __list Level columns and their listboxes.
aui-cascader__option | __option--active | __option--expanded | __option-label | __next An option, the active and expanded states, label, and next-level chevron.
aui-cascader__results | __result-list Search results.
aui-cascader__status | __status--loading | __status--error | __spinner | __retry Loading, error, empty, and result-count text.
Slot Default icon
expand chevron-down
next chevron-right
remove close
loading spinner
error alert-circle

Tokens this stylesheet reads (verified in CI). Override them in a theme or with the Theme Designer.

--aui-border-width | --aui-color-border | --aui-color-border-strong | --aui-color-disabled-bg | --aui-color-error-fg | --aui-color-focus-ring | --aui-color-hover | --aui-color-selected | --aui-color-selected-text | --aui-color-surface | --aui-color-surface-sunken | --aui-color-text | --aui-color-text-disabled | --aui-color-text-muted | --aui-control-height-md | --aui-control-height-sm | --aui-control-padding-x | --aui-duration-fast | --aui-easing-standard | --aui-focus-ring-offset | --aui-focus-ring-width | --aui-font-family-sans | --aui-font-size-md | --aui-font-size-sm | --aui-font-weight-medium | --aui-icon-size-sm | --aui-icon-size-xs | --aui-line-height-normal | --aui-line-height-tight | --aui-popover-max-height | --aui-radius-md | --aui-radius-pill | --aui-radius-sm | --aui-shadow-md | --aui-space-1 | --aui-space-2 | --aui-space-3

TypeScript definitions
interface CascaderConfig { validationTiming: 'blur' | 'input' | 'submit' }
interface CascaderOption { value: string; label: string; children?: readonly CascaderOption[]; isLeaf?: boolean; disabled?: boolean }
type CascaderPath = readonly string[];
type CascaderValue = CascaderPath | readonly CascaderPath[] | null;
interface CascaderLoadContext { signal: AbortSignal; path: readonly string[] }
interface CascaderIcons { expand: IconRef; next: IconRef; remove: IconRef; loading: IconRef; error: IconRef }
interface CascaderOptions extends Partial<CascaderConfig> {
label: string;
hideLabel?: boolean;
description?: string;
options: readonly CascaderOption[];
value?: CascaderValue;
multiple?: boolean;
changeOnSelect?: boolean;
loadChildren?: (option: CascaderOption, context: CascaderLoadContext) => Promise<readonly CascaderOption[]>;
searchable?: boolean;
maxResults?: number;
levelLabels?: readonly string[];
placeholder?: string;
clearable?: boolean;
name?: string;
required?: boolean;
disabled?: boolean;
readOnly?: boolean;
validate?: (value: CascaderValue) => string | null;
locale?: string;
direction?: 'ltr' | 'rtl';
icons?: Partial<CascaderIcons>;
}
interface CascaderValueDetail { value: CascaderValue; labels: string[] | string[][] | null; validity: FieldValidity }

Pattern: A select-only combobox (a button element with role=combobox and aria-haspopup=“dialog”) opens a non-modal dialog (WAI-ARIA APG Dialog, non-modal variant) that holds a search box and one WAI-ARIA APG Listbox per level. Levels behave like the columns of a column browser: Up and Down move within a level, the inline arrow keys move between levels. A tree view was not used because only one branch per level is shown at a time.

Checked on every docs build: the showcase passes axe (WCAG 2.2 A and AA rules) in the default, dark, and high-contrast themes and right to left; the playground loads without errors and passes axe before and after every on/off option is switched, with no Content Security Policy violations.

Key Context Action
Enter / Space / ArrowDown Trigger Open the popup (focus goes to the search box, or the first level).
ArrowDown / ArrowUp / Home / End Level Move within the level (disabled options are skipped).
ArrowRight (ArrowLeft in RTL) Level Open the active node’s children in the next level (loading them when needed) and move there.
ArrowLeft (ArrowRight in RTL) Level Back to the previous level.
Enter Level Select a leaf (or a node with changeOnSelect); otherwise open its children.
Space Level Select a leaf; open a node’s children.
Printable characters Level Type-ahead within the level.
ArrowDown Search box Move into the results (or the levels when the box is empty).
Enter Search box / results Select the active result.
Escape Popup Close and return focus to the trigger.
Tab Popup Search box, then the levels; tabbing out closes the popup.
Element Role
trigger combobox on a button element (aria-haspopup=dialog, aria-expanded)
popup dialog (aria-labelledby the label)
each level listbox (aria-label = the level name)
node option
search results listbox
loading, error, and result count status
Attribute Element Value
aria-labelledby trigger the label and the selected path text
aria-expanded / aria-controls trigger popup state / the popup
aria-required / aria-invalid / aria-describedby trigger required, shown validation state, help and error
aria-readonly trigger true when readOnly (the popup does not open)
aria-activedescendant level listbox the active option of the level
aria-selected option true on the selected path (multiple: on selected paths)
aria-multiselectable level listbox true with multiple
aria-busy level column true while its children load
aria-label chip remove buttons, clear button Remove India / Kerala, Clear selection

Opening moves focus into the popup; selecting (single) or Escape returns it to the trigger. Only the current level is in the tab sequence. Removing a chip moves focus to the next chip’s remove button, or to the trigger.

Criterion Level Note
1.3.1 Info and Relationships A
1.4.11 Non-text Contrast AA
2.1.1 Keyboard A
2.1.2 No Keyboard Trap A
2.4.3 Focus Order A
2.4.7 Focus Visible AA
4.1.2 Name, Role, Value A
4.1.3 Status Messages AA

Automated test results: Accessibility and compliance.

  • Nodes with children carry a visually hidden “has more levels” text, because options cannot expose aria-expanded.
  • Selections, removals, loading, and load errors are announced; load errors offer a Retry button that receives focus.
  • Give levelLabels so each listbox is named (Country, State, City).
  • Manual screen-reader verification (NVDA, JAWS, VoiceOver) is pending.
Import cost Minified gzip brotli CSS brotli
@absoluteui/components/cascader 62.2 kB 20.6 kB 18.4 kB 1.7 kB

Measured at build time, including every AbsoluteUI module the component pulls in. No third-party runtime dependencies.

Budget (enforced in CI) Limit
Cascader.create, per instance < 3 ms average in headless Chromium
Opening a level of 250 options < 16 ms

Tested scale: Levels of up to 1,000 options and up to 32 levels; search walks every loaded node and lists at most maxResults (default 50) paths.

Opening a level renders its options once; search walks the loaded tree and stops at maxResults.

Measured run times: Performance.

States

Closed; open; level loading; level load error; searching; no results; selected path; multiple (chips); read-only; disabled; invalid.

State transitions
From Trigger To
closed click, Enter, Space, ArrowDown on the trigger open; focus in the search box (or the first level); the selected path is expanded
open ArrowRight / click on a node the next level opens (loads first when needed: spinner, aria-busy)
loading children arrive the level appears and receives focus
loading the load rejects “Could not load options.” and a focused Retry button; announced
open Enter / click on a leaf single: selected, closed, focus on the trigger; multiple: toggled, stays open; aui-change
open type in the search box the levels are replaced by matching paths
open Escape / outside pointer / Tab out closed; pending loads aborted
Accessibility notes
  • Name the levels with levelLabels so screen readers hear “Country”, “State”, “City”.
  • Load errors move focus to Retry; the error is announced assertively.
  • The e2e axe run covers three themes; manual screen-reader verification is pending.
Responsive behavior

The trigger fills its container. The popup shows the columns side by side up to 48rem (or the viewport width) and scrolls horizontally beyond that; each level scrolls vertically.

Right-to-left

Columns run right to left, ArrowLeft opens the next level, ArrowRight goes back, and the chevrons are mirrored.

Theming

All colors are global tokens. Forced colors use Highlight/HighlightText for selected options and CanvasText for the popup border and the active outline. The loading spinner stops under reduced motion.

Global configuration
configureAbsoluteUI({ components: { cascader: { validationTiming: 'submit' } } });
Component configuration

Instance validationTiming, locale, and direction override configuration; configuration changes re-render existing instances.

Icons

icons.expand (chevron-down), icons.next (chevron-right, mirrored in RTL), icons.remove (close), icons.loading (spinner), icons.error (alert-circle).

Security

Labels and paths use textContent. Loaded children are checked (value and label strings) before use; anything else is treated as a load error.

Data handling

Loaded children are cached per node for the component’s lifetime; interrupted and failed loads are retried the next time the node opens. loadChildren receives an AbortSignal that aborts when the popup closes or the component is destroyed.

Supported data scale

Levels of up to 1,000 options and up to 32 levels. Columns are not windowed: load very long levels lazily.

Edge cases
  • A value whose path is not loaded shows the raw values for the unknown segments until those levels load; include the selected path in options to avoid this.
  • A lazily loaded node that returns no children becomes a leaf and can be selected.
  • Moving within a level collapses the deeper levels of the previous node.
  • With multiple, the same path is never added twice; selecting it again removes it.
  • getFormValue() and the hidden inputs carry the leaf values; value carries the full paths.
Errors
Code Category Cause
CASCADER_OPTIONS configuration Blank label, an invalid options tree (non-string value or label, duplicate sibling values, deeper than 32 levels), a value of the wrong shape for multiple, a non-function loadChildren or validate, invalid maxResults or levelLabels.
CFG_INVALID_VALUE / CFG_UNKNOWN_OPTION configuration Invalid configuration.

Invalid options throw before the host is modified; an invalid update() leaves the previous state intact. A rejected or malformed loadChildren result shows the level’s error state.

Known limitations
  • Search finds only loaded nodes; it does not call loadChildren.
  • Columns are not windowed.
Unsupported scenarios
  • Server-side search across unloaded levels (use Combobox with loadOptions returning paths).
  • Editing or reordering the hierarchy.