Select
One choice from a list, in a menu.
In Multi-brand
See it live
npm run storybookWhen to use it
In Multi-brand: Country and plan options.
- Use it when: Four or more options, a known closed list, or a setting with a default.
- Not when: Two to five options people should see (radio group), or many flags (checkboxes).
Instead:
- Radio group: A short list shown at once.
- Combobox: Type to find in a long list.
- Native select: The system picker.
Words
- Shared structure: object, state, next step.
- Brand tone lives in headlines and marketing copy, not in errors.
- Errors and confirmations read the same in every brand.
- Use: Get started, Plan, Order. Avoid: Brand-specific words in errors, Jargon.
The labels components use, from the voice tokens:
content.action.commit: Savecontent.action.cancel: Cancelcontent.action.destroy: Removecontent.action.retry: Try againcontent.action.empty-action: Get started
See Voice and tone for the whole voice.
Accessibility and keyboard
| Keyboard | What happens | Not |
|---|---|---|
| undefined | Arrows move; Enter picks; Escape closes. | undefined |
Test before you ship:
- It has a visible label; the chosen value is announced. undefined
Use it in code
npx open-ds add select
The component reads only component keys and semantic tokens, so it follows the brand and mode on <html>.
Tokens it reads
Select reads 30 tokens of its own, each an alias of a semantic token. Each row is one part: its own token, the semantic it aliases, and the value it ends at. Change a semantic and every component that reads it follows; override one of Select's tokens to change Select alone.
Multi-brand decides what changes when you switch theme. Here a switch changes colors, type and shape, so the marked rows differ between its brands and between light and dark; everything else holds steady.
| Part | Its token and the semantic it aliases | Value |
|---|---|---|
| Shared | ||
| Input background Changes with theme | component.input.backgroundcolor.surface.defaultvar(--input-background) | Aster Lightslate-deep.light.0:#FFFFFFAster Darkslate-deep.dark.50:#0F172ABirch Lightslate-deep.light.0:#FFFFFFBirch Darkslate-deep.dark.50:#0F172ACoral Lightslate-deep.light.0:#FFFFFFCoral Darkslate-deep.dark.50:#0F172A |
| Input border @ Changes with theme | component.input.bordercolor.border.strongvar(--input-border) | Aster Lightslate-deep.light.500:#64748BAster Darkslate-deep.dark.400:#96A3B5Birch Lightslate-deep.light.500:#64748BBirch Darkslate-deep.dark.400:#96A3B5Coral Lightslate-deep.light.500:#64748BCoral Darkslate-deep.dark.400:#96A3B5 |
| Input border focus Changes with theme on focus | component.input.border.focuscolor.border.focusvar(--input-border-focus) | Aster Lightteal.light.600:#0F766EAster Darkteal.dark.600:#7FCFC6Birch Lightpurple.light.600:#6D28D9Birch Darkpurple.dark.600:#B79DF7Coral Lightorange.light.600:#C2410CCoral Darkorange.dark.600:#F7A67F |
| Input text Changes with theme | component.input.textcolor.text.primaryvar(--input-text) | Aster Lightslate-deep.light.900:#0F172AAster Darkslate-deep.dark.900:#F8FAFCBirch Lightslate-deep.light.900:#0F172ABirch Darkslate-deep.dark.900:#F8FAFCCoral Lightslate-deep.light.900:#0F172ACoral Darkslate-deep.dark.900:#F8FAFC |
| Input placeholder Changes with theme | component.input.placeholdercolor.text.mutedvar(--input-placeholder) | Aster Lightslate-deep.light.600:#4B5A6FAster Darkslate-deep.dark.400:#96A3B5Birch Lightslate-deep.light.600:#4B5A6FBirch Darkslate-deep.dark.400:#96A3B5Coral Lightslate-deep.light.600:#4B5A6FCoral Darkslate-deep.dark.400:#96A3B5 |
| Input height | component.input.heightsize.control.defaultvar(--input-height) | size.44:2.75rem |
| Input padding x | component.input.padding-xspace.inset.control-xvar(--input-padding-x) | space.16:1rem |
| Input radius Changes with theme | component.input.radiusradius.controlvar(--input-radius) | Aster Lightradius.4:0.25remAster Darkradius.4:0.25remBirch Lightradius.12:0.75remBirch Darkradius.12:0.75remCoral Lightradius.999:9999pxCoral Darkradius.999:9999px |
| Input font size | component.input.font-sizetype.body.font-sizevar(--input-font-size) | font.size.16:1rem |
| Overlay background Changes with theme | component.overlay.backgroundcolor.surface.raisedvar(--overlay-background) | Aster Lightslate-deep.light.0:#FFFFFFAster Darkslate-deep.dark.100:#1E293BBirch Lightslate-deep.light.0:#FFFFFFBirch Darkslate-deep.dark.100:#1E293BCoral Lightslate-deep.light.0:#FFFFFFCoral Darkslate-deep.dark.100:#1E293B |
| Overlay radius Changes with theme | component.overlay.radiusradius.containervar(--overlay-radius) | Aster Lightradius.8:0.5remAster Darkradius.8:0.5remBirch Lightradius.16:1remBirch Darkradius.16:1remCoral Lightradius.20:1.25remCoral Darkradius.20:1.25rem |
| Overlay shadow Changes with theme | component.overlay.shadowelevation.overlayvar(--overlay-shadow) | Aster Lightshadow.overlay:0px 12px 32px 0px #0F172A29Aster Darkshadow.overlay-dark:0px 12px 32px 0px #00000080Birch Lightshadow.overlay:0px 12px 32px 0px #0F172A29Birch Darkshadow.overlay-dark:0px 12px 32px 0px #00000080Coral Lightshadow.overlay:0px 12px 32px 0px #0F172A29Coral Darkshadow.overlay-dark:0px 12px 32px 0px #00000080 |
| Overlay item height | component.overlay.item-heightsize.control.defaultvar(--overlay-item-height) | size.44:2.75rem |
| Trigger | ||
| Gap | component.select.trigger.gapspace.gap.defaultvar(--select-trigger-gap) | space.12:0.75rem |
| Font family Changes with theme | component.select.trigger.font-familytype.body.font-familyvar(--select-trigger-font-family) | Aster Lightfont.family.inter:Inter, system-ui, sans-serifAster Darkfont.family.inter:Inter, system-ui, sans-serifBirch Lightfont.family.plus-jakarta-sans:"Plus Jakarta Sans", system-ui, sans-serifBirch Darkfont.family.plus-jakarta-sans:"Plus Jakarta Sans", system-ui, sans-serifCoral Lightfont.family.poppins:Poppins, system-ui, sans-serifCoral Darkfont.family.poppins:Poppins, system-ui, sans-serif |
| Border width | component.select.trigger.border-widthborder-width.defaultvar(--select-trigger-border-width) | border-width.1:1px |
| Select | ||
| Focus on focus | component.select.focusborder-width.focusvar(--select-focus) | border-width.2:2px |
| Canvas Changes with theme on focus | component.select.canvascolor.surface.canvasvar(--select-canvas) | Aster Lightslate-deep.light.50:#F8FAFCAster Darkslate-deep.dark.0:#020617Birch Lightslate-deep.light.50:#F8FAFCBirch Darkslate-deep.dark.0:#020617Coral Lightslate-deep.light.50:#F8FAFCCoral Darkslate-deep.dark.0:#020617 |
| Size | component.select.sizesize.iconvar(--select-size) | size.16:1rem |
| Content | ||
| Padding | component.select.content.paddingcomponent-spacing-map.x1var(--select-content-padding) | space.4:0.25rem |
| Text Changes with theme | component.select.content.labelcolor.text.primaryvar(--select-content-label) | Aster Lightslate-deep.light.900:#0F172AAster Darkslate-deep.dark.900:#F8FAFCBirch Lightslate-deep.light.900:#0F172ABirch Darkslate-deep.dark.900:#F8FAFCCoral Lightslate-deep.light.900:#0F172ACoral Darkslate-deep.dark.900:#F8FAFC |
| Border width | component.select.content.border-widthborder-width.defaultvar(--select-content-border-width) | border-width.1:1px |
| Border Changes with theme | component.select.content.bordercolor.border.defaultvar(--select-content-border) | Aster Lightslate-deep.light.200:#E2E8F0Aster Darkslate-deep.dark.100:#1E293BBirch Lightslate-deep.light.200:#E2E8F0Birch Darkslate-deep.dark.100:#1E293BCoral Lightslate-deep.light.200:#E2E8F0Coral Darkslate-deep.dark.100:#1E293B |
| Item | ||
| Gap | component.select.item.gapspace.gap.defaultvar(--select-item-gap) | space.12:0.75rem |
| Padding left | component.select.item.padding-leftspace.inset.cell-xvar(--select-item-padding-left) | space.16:1rem |
| Padding right | component.select.item.padding-rightcomponent-spacing-map.x8var(--select-item-padding-right) | space.48:3rem |
| Corner Changes with theme | component.select.item.radiusradius.badgevar(--select-item-radius) | Aster Lightradius.4:0.25remAster Darkradius.4:0.25remBirch Lightradius.999:9999pxBirch Darkradius.999:9999pxCoral Lightradius.999:9999pxCoral Darkradius.999:9999px |
| Text size | component.select.item.font-sizetype.body.font-sizevar(--select-item-font-size) | font.size.16:1rem |
| Sunken Changes with theme on focus | component.select.item.sunkencolor.surface.sunkenvar(--select-item-sunken) | Aster Lightslate-deep.light.100:#F1F5F9Aster Darkslate-deep.dark.100:#1E293BBirch Lightslate-deep.light.100:#F1F5F9Birch Darkslate-deep.dark.100:#1E293BCoral Lightslate-deep.light.100:#F1F5F9Coral Darkslate-deep.dark.100:#1E293B |
| Disabled when disabled | component.select.item.disabledopacity.disabledvar(--select-item-disabled) | opacity.40:0.4 |