Combobox

Text input with an adjoining button and an expandable menu of options.

TextInput props apply

This component contains a TextInput component. You can bind TextInput props to this component and they will be passed to the TextInput within.

Attributes passed to input

This component will pass any HTML attributes applied to it, except for CSS class, to the <input> element within the component.

Demos

Basic Usage

The Combobox component combines a menu of selectable options with a text box that can accept arbitrary input from the user. The component should receive a v-model binding from its parent as well as an array of options (which can be empty).

The current value is

Clearable, with start icon

Valid TextInput props like startIcon, endIcon, and clearable will be passed on to the embedded TextInput.

The current value is

With custom option format

Like other menu-style components (Select, Lookup, etc.), a custom option template can be provided via the #menu-option slot.

The current value is

A non-clickable footer can be added to the end of the options menu via the #footer slot.

The current value is

Usage

Props

Prop nameDescriptionTypeValuesDefault
optionsMenu options. See the MenuOption type.MenuOption[]-
modelValueValue provided by v-model binding in the parent component.string|number-''
disabledWhether the dropdown is disabled.boolean-false

Events

Event namePropertiesDescription
update:modelValuevalue string | number - The new valueWhen the selection value changes.

Slots

NameDescriptionBindings
menu-optionDisplay of an individual option in the menuoption MenuOption - The current option
footerContent to display at the end of the options list

Last updated: