Basic usage
Props
Select (Root)
string | string[]
The controlled value of the select. Use string for single selection, string array for multiple selection.
(value: string | string[]) => void
Callback fired when the selected value changes.
string | string[]
The default value for uncontrolled usage.
boolean
Controls the open state of the select dropdown.
boolean
default:"false"
The default open state for uncontrolled usage.
(open: boolean) => void
Callback fired when the open state changes.
boolean
default:"false"
Whether multiple selections are allowed.
boolean
default:"false"
Enables autocomplete/search functionality.
'auto' | 'manual'
default:"'auto'"
The autocomplete filtering mode. ‘auto’ filters automatically, ‘manual’ requires custom filtering logic.
string
Controlled search value for autocomplete mode.
(value: string) => void
Callback fired when the search value changes.
string
default:"''"
Default search value for uncontrolled autocomplete.
Select.Trigger
'small' | 'medium'
default:"'medium'"
The size of the select trigger.
'outline' | 'text'
default:"'outline'"
The visual variant of the trigger.
IconProps
Props to customize the dropdown chevron icon.
string
Additional CSS classes to apply to the trigger.
Select.Item
string
required
The value of the select item.
boolean
Whether the item is disabled.
Single selection
Multiple selection
With groups and labels
With autocomplete
Size variants
Trigger variants
With scroll buttons
Accessibility
- The Select component is built on Radix UI Select primitive with full keyboard navigation support.
- Supports arrow keys for navigation, Enter/Space for selection, and Escape to close.
- Proper ARIA attributes including
aria-labelandaria-haspopupare automatically applied. - In autocomplete mode, the component uses
aria-haspopup="dialog"for better screen reader support. - Multiple selection state is indicated with
data-multiselectableattribute.