Patterns
CommandPalette
Keyboard-driven command menu powered by cmdk with category grouping.
Quick Preview
Click the button or press βK to open
Installation
npm install cmdk
// Copy fromsrc/components/patterns/CommandPalette.tsx
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
items | CommandItem[] | - | Command items to display |
placeholder | string | 'Search commandsβ¦' | Search input placeholder |
open | boolean | - | Controlled open state |
onOpenChange | (open: boolean) => void | - | Open state change handler |
className | string | - | Trigger button CSS classes |