Combobox

    Combobox

    Filtering and empty state

    Headless enables filter by default — non-matching items hide as you type. With Combobox.Empty you show a message when nothing remains.

    Controlled value (bind:value)

    The selected value in a signal via bind:value (controlled combobox).

    Value: praha

    Multiple selection and chips

    With multiple and bind:value as string[] (without a one-off value on the root — headless does not allow it in multi mode). Render the selected items as Combobox.Chip with onRemove ; filtering them out of the array synchronizes the state. On Combobox.Control use comboboxMultiselectControlClass and on the input comboboxMultiselectInputClass . Without Combobox.Trigger (no arrow): open the list on input focus via bind:open and onFocus . Keep the input text in a separate signal via Combobox.Input bind:value (default empty string) — otherwise headless would fill the input with the names of the selected items when multiple; the selection stays only on the chips. After a selection change, clear the filter in onChange on the root. In the list, mark the selected rows via Combobox.ItemIndicator` (headless shows them only for selected items).

    TypeScriptRust

    showOnFocus — open on focus

    The showOnFocus prop on Combobox.Input opens the list automatically on focus without having to type.

    Metadata

    Source: meta.generated.json (see npm run generate)

    File base/combobox/meta.generated.json not found or path not allowed.