Select

Base select component for dropdown selection controls.

Properties

NameTypeDefaultDescription
valueString''The selected value.
selectedIndexNumber-1The index of the selected option.
selectedOptionsArray[]Array of currently selected option elements.
displayTextString''The default display text, should only be set when doing SSR.
openBooleanfalseWhether the dropdown menu is open.
requiredBooleanfalseWhether a selection is required for form submission.
errorBooleanfalseWhether the select is in an error state.
quickBooleanfalseWhether to skip open/close animations.
offsetNumber0Offset from the field element in pixels.
alignPlacement'bottom-start'Menu alignment relative to field (e.g., 'top', 'bottom-start').
alignStrategyStrategy'absolute'Positioning strategy ('absolute' or 'fixed').

Methods

NameParametersDescription
select(value)valueSelect an option by its value.
selectIndex(i)iSelect an option by its index.
reset()Reset to initially selected options.
toggle()Toggle the menu open/closed state.

Events

NameTypeDescription
changeEventFired when the selected value has changed.
inputEventFired when the selected value has changed.