Skip to content

Combobox

Form

Searchable autocomplete input combining a text field with a filtered dropdown list.

SearchableClear selectionDisabled
Open preview

Responsive viewport — resize the window to explore. Direction and density apply only to this preview. Theme applies to the docs too.

Usage

Pass value/label options and keep value in state. Selecting the current option clears it. Search is local over option labels.

Import
import { Combobox } from "@dashboardpack/core/components/ui/combobox";

Available in the included @dashboardpack/core package. Copy the complete example from Source code for all imports and state. Add "use client" when using hooks or event handlers. See installation and theming for project setup.

API reference

Common props and defaults. Slot-specific props are named below; native elements also accept their standard HTML attributes. The component TypeScript definitions are the complete type reference.

Combobox props
PropType / DefaultDescription
optionsComboboxOption[]

Default: required

Array of { value, label } choices.
valuestring

Default: —

Selected option value.
onValueChange(value: string) => void

Default: required

Receives the selection, or an empty string to clear.
ariaLabelstring

Default: placeholder

Accessible trigger name.
searchPlaceholder / emptyMessagestring

Default: Search... / No results found.

Search and empty-state text.
disabledboolean

Default: false

Disable the trigger.

Build with these too