GitHub

/ combobox

Combobox

@kumiki/components/combobox

Compound Combobox — Root / Input / Listbox / Item / Trigger. Generic over option type T.

This component, layer by layer

Styled, copy-paste presets (preview). Run pnpm kumiki add to drop the source into your project, then edit freely.

Live preview

Live preview…

Install
pnpm add @kumiki/atelier
Filterable Combobox
<script lang="ts">
  import { Tailwind as Combobox } from '@kumiki/atelier/combobox';

  const items = [
    { id: '1', value: 'apple',  label: 'Apple'  },
    { id: '2', value: 'banana', label: 'Banana' },
    { id: '3', value: 'cherry', label: 'Cherry' },
  ];
  let query = $state('');
  const filtered = $derived(
    items.filter((i) => i.label.toLowerCase().includes(query.toLowerCase())),
  );
</script>

<Combobox.Root {items}>
  <Combobox.Input bind:value={query} aria-label="Fruit" />
  <Combobox.Trigger />
  <Combobox.Listbox>
    {#each filtered as i (i.id)}
      <Combobox.Item value={i}>{i.label}</Combobox.Item>
    {/each}
  </Combobox.Listbox>
</Combobox.Root>

/ accessibility

Accessibility

axe-core — run on every PR (LTR + RTL × every documented state).

Keyboard

KeyEffect
TypeFilters listbox.
Arrow ↓ / ↑Move active option.
EnterCommit active option.
EscapeClose listbox; clear if open.

Test discipline

  • axe-core — run on every PR (LTR + RTL × every documented state).
  • APG keyboard tests — Playwright, hand-written per pattern.
  • VoiceOver / NVDA — Guidepup nightly schedule.
  • Type-level required names — title / aria-label / aria-labelledby.
Read the W3C ARIA APG pattern ↗