components / command-palette
command-palette.
spotlight-style command palette: cmd+k opens a centered search overlay with grouped, keyboard-navigable results.
or press cmd+k / ctrl+k anywhere
installation
bunx @justin06lee/chrome@latest add command-paletteprops
| name | type | default | description |
|---|---|---|---|
| items * | PaletteItem[] | - | { id?, label, href?, group?, keywords? }[] |
| onSelect | (item: PaletteItem) => void | - | called with the chosen item. default follows item.href via window.location. |
| placeholder | string | "search…" | |
| hotkey | string | "k" | key that opens the palette with cmd/ctrl held. |
| open | boolean | - | controlled visibility; omit for the built-in hotkey flow. |
| onOpenChange | (open: boolean) => void | - | |
| emptyMessage | string | "no results." | shown when nothing matches. |
| className | string | - |