Skip to main content

Select

Ask AIView as Markdown
Copy a prompt to ask an AI assistant about this page.

Selects allow users to choose from a list of options.

Select - Code

Basic​

Editable​

Multiselect​

Validation​

Since 2.6.0

API for ix-select​

Properties​

Description

Show clear button

Attribute
allow-clear
Type
boolean
Default
false
Since TODO: Define
Description

ARIA label for the add item

Attribute
aria-label-add-item
Type
string
Default
'Add item'
Description

ARIA label for the clear icon button

Will be set as aria-label on the nested HTML button element

Attribute
aria-label-clear-icon-button
Type
string | undefined
Default
'Clear selection'
Description

Show "all" chip when all items are selected in multiple mode

Attribute
collapse-multiple-selection
Type
boolean
Default
false
Description

If true the select will be in disabled state

Attribute
disabled
Type
boolean
Default
false
Description

The maximum width of the dropdown element with value and unit (e.g. "200px").

By default the maximum width of the dropdown element is set to 100%.

Attribute
dropdown-max-width
Type
string | undefined
Description

The width of the dropdown element with value and unit (e.g. "200px").

Attribute
dropdown-width
Type
string | undefined
Description

Select is extendable

Attribute
editable
Type
boolean
Default
false
Description

Enable Popover API rendering for dropdown.

Attribute
enable-top-layer
Type
boolean
Default
false
Description

Helper text for the select component

Attribute
helper-text
Type
string | undefined
Description

Hide list header

Attribute
hide-list-header
Type
boolean
Default
false
Description

Chip label for all selected items in multiple mode.

Attribute
i18n-all-selected
Type
string
Default
'All'
Since 5.1.0
Description

Accessible label template for the overflow indicator chip shown in multiple

mode when not all selected chips fit on a single row. The {count}

placeholder is replaced with the number of hidden items (e.g. "3 more").

Attribute
i18n-more-items
Type
string
Default
'{count} more'
Description

Information inside of dropdown if no items where found with current filter text

Attribute
i18n-no-matches
Type
string
Default
'No matches'
Description

Input field placeholder

Attribute
i18n-placeholder
Type
string
Default
'Select an option'
Description

Input field placeholder for editable select

Attribute
i18n-placeholder-editable
Type
string
Default
'Type of select option'
Since 5.0.0
Description

Prefix for the accessible name of the close control on a selected chip in multiple mode.

The chip label or value is appended (e.g. "Remove Item 1").

Attribute
i18n-remove-selected-item
Type
string
Default
'Remove'
Description

Select list header

Attribute
i18n-select-list-header
Type
string
Default
'Select an option'
Description

Info text for the select component

Attribute
info-text
Type
string | undefined
Description

Error text for the select component

Attribute
invalid-text
Type
string | undefined
Description

Label for the select component

Attribute
label
Type
string | undefined
Description

Selection mode

Attribute
mode
Type
"multiple" | "single"
Default
'single'
Description

A string that represents the element's name attribute,

containing a name that identifies the element when submitting the form.

Attribute
name
Type
string | undefined
Description

If true the select will be in readonly mode

Attribute
readonly
Type
boolean
Default
false
Description

A Boolean attribute indicating that an option with a non-empty string value must be selected

Attribute
required
Type
boolean
Default
false
Description

Show helper, error, info, warning text as tooltip

Attribute
show-text-as-tooltip
Type
boolean | undefined
Description

Valid text for the select component

Attribute
valid-text
Type
string | undefined
Description

Current selected value.

This corresponds to the value property of ix-select-items

Attribute
value
Type
string | string[]
Default
''
Description

Warning text for the select component

Attribute
warning-text
Type
string | undefined

Methods​

Events​

Description

Item added to selection

Event
addItem
Detail
string
Description

Event dispatched whenever the text input changes.

Event
inputChange
Detail
string
Description

Blur input

Event
ixBlur
Detail
void
Description

Value changed

Event
valueChange
Detail
string | string[]

Slot​

Description

Select items.

API for ix-select-item​

Properties​

Since 5.1.0
Description

Disable the item. A disabled item cannot be selected via mouse or keyboard

and is excluded from the focusable items of the parent ix-select.

Attribute
disabled
Type
boolean
Default
false
Description

Displayed name of the item

Attribute
label
Type
string | undefined
Description

Flag indicating whether the item is selected

Attribute
selected
Type
boolean
Default
false
Description

The value of the item.

Important: The select component uses string values to handle selection and will call toString() on this value.

Therefor a string should be passed to value to prevent unexpected behavior.

Attribute
value
Type
string

Events​

Description

Item clicked

Event
itemClick
Detail
string