Command
hot⌘K command palette with fuzzy ranking, match highlighting, groups, shortcuts and a `useHotkey` helper.
5 files · 517 locdeps: clsx, tailwind-merge
Installation
With the shadcn CLI, pointing at this platform’s registry:
npx shadcn@latest add https://opusui.131199999.xyz/r/command.jsonOr offline, straight from your opus55 checkout (copies every file it needs):
node ../tailwind_component/opus55/scripts/add.mjs commandUsage
import { CommandDialog, useHotkey } from "@/components/opus/ui/command";
useHotkey("mod+k", () => setOpen((o) => !o));
<CommandDialog open={open} onOpenChange={setOpen} items={items} />API
| Prop | Type | Default | Description |
|---|---|---|---|
| items | CommandItem[] | — | { id, label, group?, keywords?, icon?, hint?, shortcut?, onSelect } |
| initialItems | CommandItem[] | — | Curated list shown before the user types. |
| placeholder | string | — | Input placeholder. |
| limit | number | 50 | Max ranked results. |
| footer | ReactNode | — | Hint bar under the list. |