CascadeSelect

CascadeSelect displays a nested structure of options.

CascadeSelect requires a value to bind and a collection of arbitrary objects with a nested hierarchy. optionGroupLabel is used for the text of a category and optionGroupChildren is to define the children of the category. Note that order of the optionGroupChildren matters and it should correspond to the data hierarchy.

Select a City Search results are available

CascadeSelect requires a value to bind and a collection of arbitrary objects with a nested hierarchy. optionGroupLabel is used for the text of a category and optionGroupChildren is to define the children of the category. Note that order of the optionGroupChildren matters and it should correspond to the data hierarchy.

Select a City Search results are available
basic-demo

Label of an option is used as the display text of an item by default, for custom content support define an option template that gets the option instance as a parameter. In addition value, dropdownicon, loadingicon, and optiongroupicon slots are provided for further customization.

Select a City Search results are available
template-demo

Loading state can be used loading property.

Loading... No results found
loading-demo

A floating label appears on top of the input field when focused. Visit FloatLabel documentation for more information.

p-emptylabel Search results are available
p-emptylabel Search results are available
p-emptylabel Search results are available
float-label-demo

IftaLabel is used to create infield top aligned labels. Visit IftaLabel documentation for more information.

p-emptylabel Search results are available
ifta-label-demo

When showClear is enabled, a clear icon is displayed to clear the value.

Select a City Search results are available
clear-icon-demo

CascadeSelect provides small and large sizes as alternatives to the base.

Small Search results are available
Normal Search results are available
Large Search results are available
sizes-demo

The fluid prop makes the component take up the full width of its container when set to true.

Select a City Search results are available
fluid-demo

Specify the variant property as filled to display the component with a higher visual emphasis than the default outlined style.

Select a City Search results are available
filled-demo

When disabled is present, the element cannot be edited and focused.

Disabled No results found
disabled-demo

The invalid state is applied using the ⁠invalid property to indicate failed validation, which can be integrated with Angular Forms.

Select a City Search results are available
Select a City Search results are available
invalid-demo
Select a City Search results are available
template-driven-forms-demo

CascadeSelect can also be used with reactive forms. In this case, the formControlName property is used to bind the component to a form control.

Select a City Search results are available
reactive-forms-demo

Screen Reader

Value to describe the component can either be provided with ariaLabelledBy or ariaLabel props. The cascadeselect element has a combobox role in addition to aria-haspopup and aria-expanded attributes. The relation between the combobox and the popup is created with aria-controls that refers to the id of the popup.

The popup list has an id that refers to the aria-controls attribute of the combobox element and uses tree as the role. Each list item has a treeitem role along with aria-label, aria-selected and aria-expanded attributes. The container element of a treenode has the group role. The aria-setsize, aria-posinset and aria-level attributes are calculated implicitly and added to each treeitem.

Closed State Keyboard Support

KeyFunction
tabMoves focus to the cascadeselect element.
spaceOpens the popup and moves visual focus to the selected option, if there is none then first option receives the focus.
down arrowOpens the popup and moves visual focus to the selected option, if there is none then first option receives the focus.

Popup Keyboard Support

KeyFunction
tabHides the popup and moves focus to the next tabbable element.
shift + tabHides the popup and moves focus to the previous tabbable element.
enterSelects the focused option and closes the popup.
spaceSelects the focused option and closes the popup.
escapeCloses the popup, moves focus to the cascadeselect element.
down arrowMoves focus to the next option.
up arrowMoves focus to the previous option.
right arrowIf option is closed, opens the option otherwise moves focus to the first child option.
left arrowIf option is open, closes the option otherwise moves focus to the parent option.
ON THIS PAGE
Theme Designer
Theme Designer is the ultimate tool to customize and design your own themes featuring a visual editor, Figma to theme code, cloud storage, and migration assistant.
Learn More