---
url: "https://vueda.dev/v3/reference/api/vue/Command.md"
title: "Command"
---

# Command

## Overview

Root of a command palette with built-in filtering, providing context to child components.

Theme entry: [Command](/v3/reference/theming/keys/Command.md)

## Props

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="prop-themeOverride">themeOverride</span> | `Object` |  | `null` | A partial ThemeObject keyed by component name, merged over this component's theme and provided to descendants. |
| <span id="prop-class">class</span> | `import('vue').HTMLAttributes['class']` |  | `undefined` | Additional CSS classes to apply to the root element. |
| <span id="prop-modelValue">modelValue</span> | `string\|number\|boolean\|object\|array` |  | `""` | The controlled value. Can be bound with v-model. |
| <span id="prop-defaultValue">defaultValue</span> | `string\|number\|boolean\|object\|array` |  | `undefined` | The initial value when uncontrolled. |
| <span id="prop-multiple">multiple</span> | `boolean` |  | `undefined` | Whether multiple options can be selected. |
| <span id="prop-orientation">orientation</span> | `string` |  | `undefined` | The orientation of the listbox for arrow navigation. |
| <span id="prop-dir">dir</span> | `string` |  | `undefined` | The reading direction. |
| <span id="prop-disabled">disabled</span> | `boolean` |  | `undefined` | When true, prevents user interaction. |
| <span id="prop-selectionBehavior">selectionBehavior</span> | `string` |  | `undefined` | How multiple selection behaves in the collection. |
| <span id="prop-highlightOnHover">highlightOnHover</span> | `boolean` |  | `undefined` | When true, hovering an item triggers highlight. |
| <span id="prop-by">by</span> | `string\|func` |  | `undefined` | Field for object comparison, or a custom comparison function. |
| <span id="prop-name">name</span> | `string` |  | `undefined` | The name submitted with the form. |
| <span id="prop-required">required</span> | `boolean` |  | `undefined` | When true, the field is required. |
| <span id="prop-as">as</span> | `string\|object` |  | `undefined` | The HTML element or component to render as. |
| <span id="prop-asChild">asChild</span> | `boolean` |  | `undefined` | Whether to render as a child element. |

## Slots

### `default` {#slot-default}

Slot.

## Events

| Name | Description |
| --- | --- |
| `update:modelValue` | Emitted when the value changes. |
| `highlight` | Emitted when an item is highlighted. |

[Full event reference](/v3/reference/api/vue/Command/events.md)

## Source

`client/lib/controls/command/Command.vue`
