Select

Custom select dropdown with keyboard navigation, label, and error support.

Example

Country

Props

NameTypeDefaultRequiredDescription
labelstringRequiredAccessible label text
optionsSelectOption[]RequiredArray of { value, label, disabled? }
valuestringNoControlled selected value
defaultValuestringNoInitial value (uncontrolled)
onChange(value: string) => voidNoCalled when selection changes
placeholderstring'Select an option'NoPlaceholder text
descriptionstringNoHelper text
errorstringNoError message
requiredbooleanNoMarks as required
disabledbooleanNoDisables the select
hideLabelbooleanfalseNoVisually hides label

Accessibility

  • role="combobox" on trigger with aria-expanded, aria-haspopup
  • role="listbox" on dropdown with aria-activedescendant
  • Full keyboard support: Arrow keys, Enter, Escape, Home, End
  • Type-ahead character matching

Related Tokens

--select-surface--select-on-surface--select-border--select-gap--select-trigger-gap--select-label-font-weight--select-listbox-margin-top--select-option-margin-x