Skip to main content

Multiselect API

Properties
NameTypeDefaultDescription
itemsarray[]Options for the multiselect. Each item has content, value, and optional selected, disabled, status fields. Items can also be groups with a type: 'group' field containing nested items.
valuearrayGets or sets the selected values. Matching is based on the item's value property.
contentarrayReturns the human-readable content of the selected items. Read-only.
disabledbooleanfalseDisables the multiselect.
readonlybooleanfalseSets the read-only state. The dropdown can still be opened.
loadingbooleanfalseSets the loading state. The dropdown can still be opened.
invalidbooleanfalseSets the invalid (error) state.
placeholderstringPlaceholder text shown when no items are selected.
always-show-searchbooleanfalseShows the search input even when there are 8 or fewer options.
label-merge-limitintegerInfinityNumber of selected options above which they are merged into a single label.
selection-maxnumberMaximum number of selectable options. Must be greater than 0.
JavaScript API
NameKindDescription
clear()actionDeselects all selected options.
Events
EventDescriptionReturns
changeFires when the selection changes.{ detail: { selectedOptions: array } }
searchFires when the user types in the search field. Ensure selected items remain in the filtered results.{ detail: { value: string } }
openFires when the dropdown opens.
closeFires when the dropdown closes.