Select
Dropdown select with keyboard navigation, grouping, and search. Use the high-level wrapper or compose individual styled parts with a raw base-ui Root.
Select
base-ui docs ↗Dropdown select with keyboard navigation, grouping, and search. Passoptions for a flat list or groups for sections with optional labels.
| Prop | Type | Default |
|---|---|---|
| value | string | — |
Currently selected value (controlled). | ||
| defaultValue | string | — |
Initially selected value (uncontrolled). | ||
| onValueChange | ((value: string | null, eventDetails: unknown) => void) | — |
Called when the selection changes. | ||
| disabled | boolean | — |
Prevent interaction. | ||
| required | boolean | — |
Mark the field as required for form validation. | ||
| name | string | — |
HTML name attribute for form submission. | ||
| placeholder | string | Select… |
Text shown when no value is selected. | ||
| options | SelectOption[] | — |
Flat list of options (use | ||
| groups | SelectGroup[] | — |
Grouped options with optional section labels. | ||
| className | string | — |
| id | string | — |
Override the auto-generated element id. | ||
Styled Parts
base-ui docs ↗Pre-styled wrappers around the corresponding base-ui parts. All base-ui props are forwarded.
CSS Class Names
Available as keys on the SelectStyles object. Each key maps to a hashed CSS module class name at runtime.
group-labelitemitem-indicatorlistpopuppositionerseparatortriggertrigger-icontrigger-value