logo

Combobox

Autocomplete input with a list of suggestions.

Preview

Usage

Loading...

Examples

Basic

A simple combobox with a list of frameworks.

Multiple

A combobox with multiple selection using multiple and ComboboxChips.

sveltekitremixnuxtastro

Clear Button

Use the showClear prop to show a clear button.

Trigger the combobox from a button by using the render prop. Move the ComboboxInput inside the ComboboxContent.

Disabled Options

Disable certain options while keeping them visible.

API Reference

The Combobox component handles selection state, filtering, and open state.

PropTypeDefaultDescription
valuestring | string[]undefinedControlled selected value(s).
defaultValuestring | string[]undefinedInitial selected value(s).
onValueChange(value: string | string[]) => voidundefinedCalled when selection changes.
openbooleanundefinedControlled open state.
defaultOpenbooleanfalseInitial open state.
onOpenChange(open: boolean) => voidundefinedCalled when open state changes.
multiplebooleanfalseEnables multi-select.
filter(value: string, search: string, label: string) => booleanundefinedCustom matching logic.
render(props) => ReactNodeundefinedRender prop for custom trigger elements.

The ComboboxInput supports showClear to display a clear button and containerClassName to style its wrapper.