Skip to content

Combobox

Search field with a dropdown option list and keyboard navigation.

Usage

vue
<script setup>
import { ref } from "vue";
import { ArchCombobox } from "@archora/ui";

const value = ref();
const options = [
  { value: "vue", label: "Vue" },
  { value: "react", label: "React" }
];
</script>

<template>
  <ArchCombobox v-model="value" :options="options" placeholder="Search framework" />
</template>

Live sandbox

Combobox can be tested directly on this page.

interactive
<Combobox />

Props

PropTypeDefaultDescription
options{ value: string; label: string; disabled?: boolean }[]-Option list.
modelValuestring-v-model value.
searchValuestring-Controlled search text.
placeholderstring"Search option"Placeholder.
disabledbooleanfalseDisables the component.
namestring-Field name.
autocompletestring"off"Autocomplete.
ariaLabelstring-aria-label.
ariaLabelledbystring-aria-labelledby.
ariaDescribedbystring-aria-describedby.

Events

EventPayloadDescription
update:modelValuevalue: stringmodelValue change.
update:searchValuevalue: stringsearchValue change.
changevalue: stringValue change.