Skip to content

Command

Command palette with search, empty state, and item selection.

Usage

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

const items = [
  { value: "open", label: "Open project", description: "Go to project" },
  { value: "deploy", label: "Deploy", description: "Run release" }
];
</script>

<template>
  <ArchCommand :items="items" @select="runCommand" />
</template>

Live sandbox

Command can be tested directly on this page.

interactive
<Command />

Props

PropTypeDefaultDescription
items{ value: string; label: string; description?: string; disabled?: boolean }[]-Item collection.
modelValuestring-v-model value.
searchValuestring-Controlled search text.
placeholderstring"Search commands"Placeholder.
emptyTextstring"No results"Empty-state text.
disabledbooleanfalseDisables the component.
ariaLabelstring-aria-label.
ariaLabelledbystring-aria-labelledby.

Events

EventPayloadDescription
update:modelValuevalue: stringmodelValue change.
update:searchValuevalue: stringsearchValue change.
selectvalue: stringItem selection.