ComponentsCombobox

formstexulinot agent-emittableapp

Combobox

combobox

A text input that filters a list of options, for one value or several.

Live examples

Required form field

Required form field

Loading demo…

Props

Public props for Combobox
NameKindRequiredDefaultDescription
valueunknownno—Selected value (a string, or a string array when multiple)
defaultValueunknownno—Starting selection; a form reset restores it
inputValuestringno—Text in the input (bindable)
defaultInputValuestringno""—
itemsarrayno—Options as { value, label, disabled? }
loadOptionsunknownno—Function prop the host passes: (query, signal) => Promise<items> for remote options. Not agent-emittable (functions are not data).
filterunknownno—Function prop the host passes: (item, query) => boolean. Replaces the default match (label contains the query, ignoring case); runs on the trimmed, non-empty query; unused with loadOptions. createFoldedFilter builds an accent-insensitive one. Not agent-emittable (functions are not data).
multiplebooleannofalse—
disabledbooleannofalseNot interactive, not submitted, not validated
namestringno—Form field name: submits the value (one entry per value when multiple)
requiredbooleannofalseBlocks form submission until a value is selected
requiredMessagestringno—Translated message when required blocks submission (default: the browser message)
formstringno—Associated form id
openbooleannofalse—
sizeenum (sm, md, lg)no"md"—
variantenum (outline, soft)no"outline"—
classstringno——
onValueChangeeventno——
onInputValueChangeeventno——
onOpenChangeeventno——
childrenslotno——

Keyboard

Keyboard behavior for Combobox
KeyAction
Enter, EscapeArrow keys move, Enter selects, Escape closes; empty, loading and error states are announced
aWith required, a rejected form moves focus to the input

Accessibility

  • The input keeps focus; aria-activedescendant tracks the highlighted option
  • Arrow keys move, Enter selects, Escape closes; empty, loading and error states are announced
  • With required, a rejected form moves focus to the input

Evidence for combobox

Latest committed gates for combobox (as of 2026-10-23). Static snapshot — not live CI.

Behavior

checkedscenario combobox

6 checks

Rows in tests/behavior/scenarios/combobox.spec.ts, held to the WAI-ARIA APG pattern, run on Chromium, WebKit and the Pixel 7.

Size (gzip)

@texuli/primitives/combobox · measured 12.9 KiB · budget 24.0 KiB

Measured gzip from docs/quality/perf-primitives.md (2026-10-23).

Axe

documented

  • tests/e2e/site-component-pages.spec.ts
  • docs/quality (a11y-*)

Site component pages axe gate; package-level a11y docs under docs/quality when present.

Browsers

  • chromium
  • webkit
  • mobile

Playwright projects: Desktop Chrome, Desktop Safari, Pixel 7. Firefox is a known gap on this host.

When to use

Use when

  • Pick from a long list by typing to filter
  • Options loaded from a server as the user types

Don’t use when

Prefer another component

  • A short closed list (use select or radio-group)
  • Several values shown as chips (use multi-select)