Components
Select
Root of the select - an accessible listbox built on Base UI that owns open
state and the chosen value; drive it with value/onValueChange
(controlled) or defaultValue (uncontrolled).
Usage
Best practices
Selectis only the state root - composeSelectTrigger,SelectValue,SelectContent, andSelectItems inside it or nothing renders.Use
Selectto pick one option from a short closed list; when users need type-to-filter, useComboboxinstead.Drive it with
value+onValueChange(controlled) ordefaultValue(uncontrolled), and give it an accessible name via the trigger (Field/Label).Pass
items(a value-to-label map or{ value, label }[]) so the trigger shows the selected label even before the popup has mounted.
Props
Select
SelectContent
SelectGroup
SelectItem
SelectLabel
SelectSeparator
SelectTrigger
SelectValue
Also exports
- const
selectAnatomy
Anatomy
Composition
Used by