Components / Choice

Combobox

Autocomplete input: local or async (debounced, abortable) suggestions, optional free text.

@ruckc/truss-ui Choice

Import

import { Combobox } from '@ruckc/truss-ui';

Playground

value

API

PropTypeDefaultDescription
options Option[][]The choices to offer.
loadOptions (query: string, signal: AbortSignal) => Promise<Option[]>—Async source (server search). Receives the query and an AbortSignal for stale requests.
value bindable string—The current value. Bind it with `bind:value`.
label string—Visible label shown above the control.
ariaLabel string—Accessible name when no visible `label` is shown.
placeholder string'Type to search…'Hint shown while the field is empty.
allowCustom booleanfalseAccept free text as the value when nothing is picked.
disabled booleanfalseDisables the control: it cannot be focused, changed or activated.
error string—Error message. Marks the control invalid, replaces the hint, and is announced to assistive technology.
debounce number200Milliseconds to wait after typing before querying `loadOptions`.
/docs/combobox Truss UI · MIT