Controls
A command palette with grouped results, fuzzy search, and a useCommandPalette hook that wires up Cmd+K for you.
Installation
ProRequires a Planes Pro license.
npx shadcn add @useplanes/command-palette
Unlock with Planes Pro
$99 once · 54 Pro components · lifetime updates.
// Cmd+K (and Ctrl+K) open the palette automatically.
<CommandPalette />Examples
Supply your own commands
The palette is data-driven. Edit the DEMO_COMMANDS array in the file, or build your own list of Command objects.
import type { Command } from "@/components/ui/SearchModal";
const commands: Command[] = [
{
id: "new-doc",
title: "New document",
description: "Create a blank doc",
group: "Actions",
shortcut: "N",
onSelect: () => createDoc(),
},
];Open it from your own button
useCommandPalette binds Cmd+K for you and exposes open state you can drive manually.
import { useCommandPalette } from "@/components/ui/SearchModal";
const { open, setOpen, toggle } = useCommandPalette();
<button onClick={toggle}>Search</button>Use cases
App-wide search
One Cmd+K entry point to jump to any page, record, or setting.
Action launcher
Run commands (new doc, invite, toggle theme) without leaving the keyboard.
Navigation menu
Grouped, searchable navigation for apps with a lot of routes.
Docs and help
Let users search docs or trigger support actions from anywhere.