On this page:

Select

Native select

Preview

index.tsx

Preview

index.tsx

Custom select

Preview

index.tsx
Choose option
Choose option
Choose option
Choose option

Custom multiple select

Preview

index.tsx
Choose option
Choose option
Choose option
Choose option
Choose option

Design Tokens for Select

TokenColor forState/Meaning
--par-color-bg-field-enabledSelect field backgroundEnabled
--par-color-bg-field-hoveredSelect field backgroundHovered
--par-color-bg-field-disabledSelect field backgroundDisabled
--par-color-bg-field-readonlySelect field backgroundReadonly
--par-color-bg-field-invalidSelect field backgroundInvalid/Error
--par-color-border-field-enabledSelect field borderEnabled
--par-color-border-field-hoveredSelect field borderHovered
--par-color-border-field-disabledSelect field borderDisabled
--par-color-border-field-invalidSelect field borderInvalid/Error
--par-color-border-field-focusedSelect field borderFocused
--par-color-text-field-placeholderPlaceholder textAny
--par-color-text-field-filledSelect field textFilled
--par-color-text-field-labelLabel textAny
--par-color-text-field-disabledSelect field textDisabled
--par-color-text-field-readonlySelect field textReadonly
--par-color-text-field-invalidSelect field textInvalid/Error
--par-color-icon-field-button-enabledIcon color (button enabled)Enabled
--par-color-icon-field-button-hoveredIcon color (button hovered)Hovered
--par-color-icon-field-button-pressedIcon color (button pressed)Pressed
--par-color-icon-field-button-disabledIcon color (button disabled)Disabled

Select API Reference

<Select />

PropTypeDefaultDescription
nativebooleanfalseUse native HTML <select> instead of custom select
optionsarray of { value, label, disabled? }List of options for the dropdown
valuestring | string[]Selected value(s)
onChangefunction (value: string | string[] | event)Callback when value changes (event for native, value for custom)
multiselectbooleanfalseAllow multiple selection (custom select only)
filterablebooleanfalseAllow filtering options (custom select only)
clearButtonbooleanfalseShow clear button to reset selection (custom select only)
deselectablebooleanfalseAllow deselecting a selected option (custom select only)
keepOpenbooleantrueKeep dropdown open after selection (custom select only)
placeholderstring'Please choose an option'Placeholder text when no value is selected (custom select only)
floatingLabelstring | ReactNodeFloating label above the select
leftIconReactNodeIcon on the left side of the select
selectedIconReactNodeIcon shown next to selected option(s) in dropdown (custom select only)
countDescriptionstring'item(s) selected'Description for selected count (custom multi-select only)
theme'default' | 'alternative''default'Visual theme
selectSize'sm' | 'md''md'Size of select
tagPropsobjectTag props for multi-select chips (custom select only)
disabledbooleanfalseDisable the select
onFocusfunction (event)Callback when select gains focus
onBlurfunction (event)Callback when select loses focus
childrenReactNodeCustom option/group elements (alternative to options prop)
...divPropsSee MDNInherits all native div props (custom select only)
...selectPropsSee MDNInherits all native select props (native select only)
...MenuPropsSee MenuInherits all props from Menu (custom select only)
...TagPropsSee TagInherits all props from Tag (custom select only)

Note: Select automatically chooses between native and custom select based on the native prop. See Menu and Tag for additional props when using custom select.