Command
Command palette pattern. Composable input + grouped item list with fuzzy search. CommandDialog wraps it in a modal for global ⌘K menus.
Default
Inline command palette anchored to its container.
No results found.
Suggestions
Calendar
Search Emoji
Calculator
Settings
Profile⌘P
Billing⌘B
Settings⌘S
Basic
A simple command menu in a dialog.
Shortcuts
CommandShortcut right-aligns a keyboard hint inside each item.
Groups
A command menu with groups, icons and separators.
Scrollable
A long list scrolls inside CommandList while the input stays pinned.
Anatomy
Import all parts and piece them together.
vue
<script setup>
import {
Command,
CommandEmpty,
CommandGroup,
CommandInput,
CommandItem,
CommandList,
CommandSeparator,
} from "@/components/ui/command";
</script>
<template>
<Command>
<CommandInput />
<CommandList>
<CommandEmpty />
<CommandGroup>
<CommandItem />
<CommandItem />
</CommandGroup>
<CommandSeparator />
<CommandGroup>
<CommandItem />
<CommandItem />
</CommandGroup>
</CommandList>
</Command>
</template>API Reference
Command
CommandDialog
CommandInput
CommandItem
CommandGroup / CommandEmpty
Accessibility
Keyboard shortcuts and ARIA behavior.
- Follows the combobox/listbox pattern: a textbox input controls a role=listbox of items.
- aria-activedescendant tracks the highlighted item while DOM focus stays on the input.