Select
Picks one option from a list too long to show as radio buttons.
When to use
- Pick one option from about five to fifteen known options.
When not to use
- Two to four options: use Radio Group, so every option is visible.
- A long list, or one users search by typing: use Combobox.
- Mobile-first forms: use Native Select.
Install
npx shadcn@latest add @clinia/selectAnatomy
- 1Trigger
data-slot="select-trigger"border-input · rounded-lg - 2Value or placeholder
data-slot="select-value"text-sm · text-muted-foreground - 3Icon
[data-slot=select-trigger] > svgsize-4 · text-muted-foreground
Clinia rules
- The highlighted option is
bg-foreground/4, the ink tint every hover and keyboard highlight uses, withtext-foreground. - The trigger shares the Input boundary and focus ring, so a form mixing inputs and selects reads as one.
- The placeholder names the choice (
Pick a region), not the control (Select…).
Do and don't
States
placeholder
selected
focus
invalid
disabled
size sm
open · highlighted, selected and disabled options
Focus cells apply the component's focus-visible classes statically. Toggle the site theme to review both themes.
Accessibility
Built in
- The trigger's focus-visible ring is the solid Trust ring (
border-ring ring-3 ring-ring/30);aria-invalidswaps it to a destructive ring.
Your responsibility
- Label the trigger: a visible
Label, or anaria-labelwhen the context already names it. - Mark options users can't pick as
disabled, and say why in the option text.
How to test
- Press Tab to reach the trigger, then Enter, Space or Arrow Down: the list opens on the selected option.
- Arrow keys move through options, a letter jumps to the first match, Enter picks, and Escape closes and returns focus to the trigger.
- With a screen reader, the trigger announces its label and current value.
API
SelectTrigger
| Prop | Values | Default | Description |
|---|---|---|---|
| size | smdefault | default |
|
All other props come from Base UI Select.