MeldUI

Combobox

An autocomplete input with a filterable dropdown list for selecting values.

Usage

Props

PropTypeDefaultDescription
modelValueT | Array<T>-The selected value. Use with v-model.
multipleboolean-Whether multiple items can be selected.
openboolean-Controlled open state. Use with v-model:open.
disabledbooleanfalseWhether the combobox is disabled.

Events

EventPayloadDescription
update:modelValueTEmitted when the selected value changes.
update:openbooleanEmitted when the open state changes.

Sub-components

ComboboxAnchor

Positions the dropdown relative to the input.

ComboboxInput

Filterable text input.

PropTypeDefaultDescription
displayValue(val: any) => string-Function to format the selected value for display.
placeholderstring-Placeholder text when empty.

ComboboxTrigger

Toggle button to open/close the dropdown.

ComboboxList

Dropdown list container.

PropTypeDefaultDescription
position'popper' | 'item-aligned''popper'Positioning strategy.
align'start' | 'center' | 'end''center'Horizontal alignment.
sideOffsetnumber4Distance from anchor in pixels.

ComboboxItem

Selectable option in the list.

PropTypeDefaultDescription
value*T-The option value.
disabledboolean-Disable this option.
textValuestring-Text used for filtering when content is complex.

ComboboxItemIndicator

Checkmark indicator for the selected item.

ComboboxGroup

Groups related options under a heading.

PropTypeDefaultDescription
headingstring-Group heading text.

ComboboxEmpty

Shown when no options match the filter.

ComboboxSeparator

Visual divider between groups.

ComboboxCancel

Button to clear the selected value.