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-palette
props
nametypedefaultdescription
items *PaletteItem[]-{ id?, label, href?, group?, keywords? }[]
onSelect(item: PaletteItem) => void-called with the chosen item. default follows item.href via window.location.
placeholderstring"search…"
hotkeystring"k"key that opens the palette with cmd/ctrl held.
openboolean-controlled visibility; omit for the built-in hotkey flow.
onOpenChange(open: boolean) => void-
emptyMessagestring"no results."shown when nothing matches.
classNamestring-