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.
Popup
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.
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | string[] | undefined | Controlled selected value(s). |
defaultValue | string | string[] | undefined | Initial selected value(s). |
onValueChange | (value: string | string[]) => void | undefined | Called when selection changes. |
open | boolean | undefined | Controlled open state. |
defaultOpen | boolean | false | Initial open state. |
onOpenChange | (open: boolean) => void | undefined | Called when open state changes. |
multiple | boolean | false | Enables multi-select. |
filter | (value: string, search: string, label: string) => boolean | undefined | Custom matching logic. |
render | (props) => ReactNode | undefined | Render prop for custom trigger elements. |
The ComboboxInput supports showClear to display a clear button and containerClassName to style its wrapper.