Command Palette
A search surface on cmdk: a 20px-radius panel with a 48px input row and grouped 36px rows.
Interactive preview · desktop · dark
Installation
Installation is available on the Startup and Business plans. Your personal install command appears here once you have access.
Usage
Import it, pass your props, and make it part of your product.
example.tsx
import { CommandPalette } from '@/components/component-kit/items/command-palette';
export function Example() { return ( <CommandPalette placeholder="Search actions" groups={[ { id: 'go', heading: 'Go to', items: [{ id: 'inbox', label: 'Inbox', shortcut: 'G I' }] }, { id: 'do', heading: 'Actions', items: [{ id: 'new', label: 'New document', shortcut: '⌘N' }] }, ]} /> );}Props
| Prop | Type | Default | Description |
|---|---|---|---|
groups | CommandPaletteGroup[] | — | Groups with an optional heading and their items. |
placeholder | string | Search… | Input placeholder. |
onItemSelect | (item) => void | — | Called with the chosen item. |