bloxa

Combobox

FREE

Autocomplete field that filters, highlights matches, picks with the keyboard, creates new values and loads async.

Installation

Terminal
npx @bloxa/cli add combobox
# or: npx shadcn@latest add @bloxa/combobox

Packages installed automatically: radix-ui

Examples

Suggestions and create

Type, use the arrows and press Enter. The second field can create new values.

Server search

API reference

Every component also accepts the props of the element it renders.

Combobox

PropTypeDefaultDescription
options(string | { value, label?, description?, icon?, disabled? })[]—Suggestions.
value / onValueChangestring / (value) => void—Text in the field.
onSelect(option) => void—When a suggestion is picked.
strictbooleanfalseOnly accept listed options.
creatable / onCreateboolean / (value) => voidfalse"Create" option.
loadingbooleanfalseLoading spinner.
filterbooleantrueBuilt-in filtering; turn off when the server filters.