Command Palette Component

v0 prompt for a command palette component with fuzzy search, keyboard navigation, and grouped results.

v0command-palettecomponentshadcn-ui
Edit View
Prompt
Create a command palette component (similar to VS Code's Cmd+K or Spotlight):

- Triggered by Cmd+K keyboard shortcut
- Full-screen overlay with blurred background
- Search input with auto-focus
- Results grouped by category: Pages, Actions, Settings, Recent
- Each result shows: icon, title, description, keyboard shortcut (optional)
- Fuzzy search matching (highlights matched characters)
- Keyboard navigation: arrow keys to move, Enter to select, Esc to close
- Recently used items shown by default (before typing)
- Smooth open/close animation (scale + fade)
- Maximum 8 visible results with scroll for more
- "No results found" state with suggestion

Use shadcn/ui Dialog as the base. Make it accessible with proper ARIA attributes. Style with Tailwind CSS.

Save this prompt to your library

Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.