Skip to main content
Vuetify0 is now in alpha!
Vuetify0 Logo
Theme
Mode
Palettes
Accessibility
Vuetify One
Sign in to Vuetify One

Access premium tools across the Vuetify ecosystem — Bin, Play, Studio, and more.

Not a subscriber? See what's included

Combobox

A headless autocomplete input that filters options as the user types, with client and server-side filtering support.

Usage

The Combobox component follows the same compound pattern as Select, but replaces the activator button with a Control input that accepts free text. Filtering happens automatically as the user types.

Anatomy

vue
<script setup lang="ts">
  import { Combobox } from '@vuetify/v0'
</script>

<template>
  <Combobox.Root>
    <Combobox.Activator>
      <Combobox.Control />

      <Combobox.Cue />
    </Combobox.Activator>

    <Combobox.Description />

    <Combobox.Error />

    <Combobox.Content>
      <Combobox.Item />

      <Combobox.Empty />
    </Combobox.Content>

    <Combobox.HiddenInput />
  </Combobox.Root>
</template>

Architecture

Root creates selection, virtual focus, popover, and adapter contexts. Control drives the query string — the adapter translates queries into a filtered ID set. Items register with selection and use v-show (not v-if) against the filtered set, preserving selection state even when hidden. Empty renders when the filtered set is empty. Description and Error provide accessible help text and validation messages linked to Control via ARIA attributes.

Examples

Recipes

Form Submission

Set name on Root to auto-render hidden inputs for form submission — one per selected value in multi-select mode:

vue
<template>
  <Combobox.Root v-model="value" name="country">
    <!-- ... -->
  </Combobox.Root>
</template>

Custom Client Filtering

Pass a ClientComboboxAdapter with a custom filter function to override the default substring matching:

vue
<script setup lang="ts">
  import { Combobox, ClientComboboxAdapter } from '@vuetify/v0'

  const adapter = new ClientComboboxAdapter({
    filter: (query, value) => String(value).toLowerCase().startsWith(query.toLowerCase()),
  })
</script>

<template>
  <Combobox.Root :adapter>
    <!-- ... -->
  </Combobox.Root>
</template>

Open on Input Only

By default the dropdown opens on focus. Set open-on="input" on Control to only open when the user starts typing — useful for server search where an empty query should not trigger a fetch:

vue
<template>
  <Combobox.Control open-on="input" placeholder="Type to search…" />
</template>

Data Attributes

Style interactive states without slot props:

AttributeValuesComponent
data-selectedtrueItem
data-highlighted""Item
data-disabledtrueItem
data-state"open" / "closed"Activator, Cue

Accessibility

The Combobox implements the WAI-ARIA Combobox↗︎ pattern with a listbox popup.

ARIA Attributes

AttributeValueComponent
rolecomboboxControl
rolelistboxContent
roleoptionItem
aria-autocompletelist / bothControl
aria-expandedtrue / falseControl
aria-haspopuplistboxControl
aria-controlslistbox IDControl
aria-activedescendanthighlighted option IDControl
aria-describedbydescription IDControl (when Description mounted)
aria-errormessageerror IDControl (when Error mounted and errors exist)
aria-invalidtrueControl (when invalid)
aria-selectedtrue / falseItem
aria-disabledtrueItem (when disabled)
aria-multiselectabletrueContent (when multiple)
aria-hiddentrueCue
aria-livepoliteError
Tip

aria-autocomplete="both" is set automatically when strict is enabled, signaling that the input value will revert to a valid option on close.

Keyboard Navigation

KeyAction
ArrowDown / ArrowUpOpen dropdown, or move highlight down / up
EnterSelect highlighted item
EscapeClose dropdown
TabClose dropdown and move focus
HomeMove highlight to first item
EndMove highlight to last item
Was this page helpful?

Ctrl+/