Back to Components

Form

Select

Dropdown picker built on bits-ui's Select — keyboard typeahead, focus management, ESC, popover positioning all handled.

Examples

Theme picker

<Select
  bind:value={theme}
  options={[
    {value: 'light', label: 'Light'},
    {value: 'dark', label: 'Dark'},
    {value: 'auto', label: 'Match system'},
  ]}
/>

Small + placeholder

<Select size="sm" placeholder="Priority…" options={…} />

Props

PropTypeDefaultDescription
options{value, label, disabled?}[]Option definitions.
valueTBindable selected value.
onValueChange(next: T) => voidFires when selection changes.
placeholderstring'Select…'Shown when nothing is selected.
size'sm' | 'md''md'Trigger height tier.
ariaLabelstringAccessible name override.

Install

CLI

npm install bits-ui
npx @a3tai/mittsu add select