Combobox also Multi select

A select you can type in, an autocomplete (Mantine's searchable Select and MultiSelect; for free-form tags, ray-tags-input): typing filters the options; multiple keeps chips; creatable adds new values; clearable, max-values, groups, a result limit.

Source on GitHub

Search a long list, with groups
multiple: chips, max-values

Pick, type or remove: the values show here.

In a form, variants and states
Submit
Code

API

For AI agents: this API as Markdown, or every component in llms-full.txt.

<ray-combobox> · RayCombobox

The WAI-ARIA combobox pattern (a text field with a listbox popup; the active option is aria-activedescendant). Arrows move, Enter picks, Escape closes (then clears with clearable), Backspace in an empty field removes the last chip. The form gets one entry per value. On a touch screen the list opens under the field while the keyboard is up, and little room is left for it: for free-form tags with suggestions (multiple creatable), ray-tags-input keeps them in view with no popup.

PropertyAttributeTypeDefaultDescription
valuevalue (initial)stringThe chosen value; an array with multiple. The value attribute: "a,b" with multiple.
data—arrayOptions instead of child <option>/<optgroup> elements.
multiplemultiple reflectsbooleanSeveral values, shown as chips.
placeholderplaceholderstringShown while empty.
creatablecreatablebooleanWhat was typed can be added when no option matches it ("+ Create …"); fires ray-create.
clearableclearablebooleanA button that clears the value.
maxValuesmax-valuesnumberWith multiple: at most this many.
limitlimitnumberAt most this many options shown (large lists: keep typing).
nothingFoundnothing-foundstringNo matches (text combobox.nothing-found)Shown when nothing matches.
openopen reflectsbooleanThe dropdown is shown.
EventDescription
changeThe value changed (read value).
inputSame moment as change.
ray-createA new value was created from the typed text.
ray-openThe dropdown opened.
ray-closeThe dropdown closed.
SlotDescription
(default)<option> and <optgroup> elements.
PartDescription
inputThe text field.
chipsThe chips container.
chipA chip.
clearThe clear button.
dropdownThe listbox.
optionAn option.

Texts

What it writes itself, in English; setStrings() translates them (Getting started: Languages).

KeyEnglish
combobox.clearClear
combobox.removeRemove {label}
combobox.create+ Create “{query}”
combobox.more{count} more: keep typing
combobox.nothing-foundNo matches