Command Palette Demo
Cmd ⌘ + K (Mac) or Ctrl + K (Windows / Linux) to open the command palette. Jump to pages or trigger actions from here.
Ideas to improve:
- Add projects/components to search
- Focus input with
/, close palette withEsc - Feed commands dynamically from JSON/config
Command list
Home
HComponents Playground
CUpdates / Announcements
Image Converter
Notification Demo
Theme: System / Light / Dark
TLight theme
Dark theme
GitHub: aqiray
Show notifications (mock)
Usage Examples
Basic CommandPalette
"use client";
import { useState } from "react";
import { CommandPalette, type CommandItem } from "@/components/command-palette";
const commands: CommandItem[] = [
{
id: "home",
label: "Home",
group: "Navigation",
href: "/",
icon: Home,
},
{
id: "about",
label: "About",
group: "Navigation",
href: "/about",
icon: User,
},
];
export default function MyComponent() {
const [open, setOpen] = useState(false);
return (
<CommandPalette
commands={commands}
open={open}
onOpenChange={setOpen}
/>
);
}CommandPalette with Shortcut
<CommandPalette
commands={commands}
open={open}
onOpenChange={setOpen}
enableShortcut
/>