~/siddharthsiddharth_meena
HomeAboutComponents
Back to Components

Command Palette

A clean command palette with smooth scale animations, search functionality, keyboard navigation, and customizable command groups.

Preview

Installation

Install the component using the CLI.

npx shadcn@latest add https://siddz.com/r/command-palette.json

Usage

Import the component:

import { CommandPaletteProvider, CommandPalette, CommandPaletteSearchTrigger } from "@/components/command-palette"

Use it in your code:

const groups = [
  {
    heading: "Navigation",
    items: [
      { id: "home", label: "Go to Home", shortcut: ["G", "H"] },
      { id: "projects", label: "View Projects" },
    ],
  },
];

<Command...

Props

PropertyTypeDefaultDescription
groups*array-Array of command groups, each with heading and items array.
placeholderstring"Type a command or search..."Placeholder text for the search input.
onSelectfunctionundefinedCallback fired when a command is selected. Receives the selected item.
emptyMessagestring"No results found."Message shown when no results match the search.
classNamestring""Additional CSS classes for the palette container.

© 2026 Siddharth Meena.

PortfolioAboutComponents
X (Twitter)
Email
GitHub