Components
Select
A closed set of choices with one visible value. The trigger stays compact; the list opens in place with typeahead and keyboard navigation.
value: ncr
Usage
A closed set where one value stays visible on the trigger.
Do and don't
- Do. Label it with FieldLabel and keep option values stable.
- Don't. Use it when the set is large enough to need search.
Composition
Select owns the value and popup. SelectTrigger is the button, SelectContent holds the list, and SelectItem is each option. SelectGroup, SelectLabel and SelectSeparator organize longer lists.
Props
Select:value,defaultValue,onValueChange,disabled,name,required,size.SelectTrigger:placeholder,icon,error,size.SelectItem:index(its position in the list),value,disabled,icon.
Behavior and states
The selected row holds the popup briefly so the checkmark can draw before it closes. Escape and outside presses still close immediately. The list flips on collision, supports typeahead and keeps a hidden form input so the value submits with a form. Disabled items stay visible but cannot be chosen.
Accessibility
Base UI owns the combobox roles, list navigation and typeahead. Give the control a real label with FieldLabel; a placeholder is not a label. Pass validation text to FieldError and link it through Field. The trigger is a native button, so Enter and Space open it and focus returns after a pick.
Responsive
The popup tracks the trigger and flips when space is tight. Set size on the root so the trigger and list share the 36px or 28px step; omit it to follow the surrounding size context.
Related
Text Field provides the label and error wiring, Radio Group keeps all options visible, and Combobox adds search.