About
A command palette with a trigger button, a global Cmd/Ctrl+K shortcut, grouped and searchable results, an animated active row, and full keyboard navigation with arrows, Home, End, Enter and Escape. Includes an empty state, focus trap and scroll lock.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Command Palette to your project and fits it to your theme.
Code
How Command Palette is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
/**
* PrequelUI Animate — MIT — https://prequeluianimate.terravidhal.me
*/
import {
Bell,
Command,
CreditCard,
Home,
LayoutGrid,
Mail,
Plus,
Upload,
Users,
} from "lucide-react";
import { CommandPalette, type CommandItem } from "@/components/ui/command-palette";
const ITEMS: CommandItem[] = [
{
id: "dashboard",
label: "Open dashboard",
description: "Jump back to the overview",
group: "Navigation",
icon: <Home />,
shortcut: "G D",
keywords: ["home", "overview", "stats"],
},
{
id: "projects",
label: "Go to projects",
description: "Browse every active project",
group: "Navigation",
icon: <LayoutGrid />,
shortcut: "G P",
keywords: ["work", "board"],
},
{
id: "team",
label: "Team directory",
description: "Find a teammate and their role",
group: "Navigation",
icon: <Users />,
shortcut: "G T",
keywords: ["people", "members"],
},
{
id: "new-project",
label: "New project",
description: "Start from a blank board",
group: "Create",
icon: <Plus />,
shortcut: "C P",
keywords: ["add", "create"],
},
{
id: "invite",
label: "Invite a teammate",
description: "Send an email invitation",
group: "Create",
icon: <Mail />,
shortcut: "I T",
keywords: ["member", "email"],
},
{
id: "upload",
label: "Upload an asset",
description: "Add files to the shared library",
group: "Create",
icon: <Upload />,
shortcut: "U A",
keywords: ["file", "media", "image"],
},
{
id: "notifications",
label: "Notification settings",
description: "Choose what reaches your inbox",
group: "Workspace",
icon: <Bell />,
shortcut: "S N",
keywords: ["alerts", "email", "preferences"],
},
{
id: "billing",
label: "Billing and plans",
description: "Invoices, seats and payment method",
group: "Workspace",
icon: <CreditCard />,
shortcut: "S B",
keywords: ["invoice", "subscription", "payment"],
},
{
id: "shortcuts",
label: "Keyboard shortcuts",
description: "See every command at a glance",
group: "Workspace",
icon: <Command />,
shortcut: "?",
keywords: ["keys", "help"],
},
];
export default function CommandPaletteDemo() {
return (
<main className="flex min-h-screen w-full items-center justify-center bg-background px-6 py-12">
<CommandPalette items={ITEMS} defaultOpen footerNote={null} />
</main>
);
}
















