Back to Components

Form

Combobox

Typeahead select built on bits-ui's Combobox. Type to filter the list, ↑↓ to navigate, ↩ to select. bits-ui filters items by their `label` automatically.

Examples

Framework picker

<Combobox
  bind:value={framework}
  options={[
    {value: 'svelte', label: 'Svelte'},
    {value: 'react', label: 'React'},
    …
  ]}
  placeholder="Search frameworks…"
/>

Props

PropTypeDefaultDescription
options{value, label, disabled?}[]Option definitions. bits-ui filters by `label` automatically.
valueTBindable selected value.
onValueChange(next: T) => voidFires when selection changes.
placeholderstring'Search…'Search input placeholder.
size'sm' | 'md''md'Height tier.
ariaLabelstringAccessible name override.

Install

CLI

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