Command Palette
Spotlight-style ⌘K menu with subsequence search, groups, shortcuts and full keyboard navigation.
Import
import { CommandPalette, Button } from "@igorao79/uivix";Examples
Default
Click the button or press Ctrl/⌘ + K
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| open | boolean | - | Whether the palette is visible |
| onClose | () => void | - | Called on Escape, backdrop click or after a selection |
| items | CommandItem[] | - | { id, label, keywords?, group?, icon?, shortcut?, onSelect } |
| placeholder | string | "Type a command or search…" | Input placeholder |
| hotkey | boolean | true | Toggle with Cmd/Ctrl+K (requires onOpenChange) |
| onOpenChange | (open: boolean) => void | - | Called by the hotkey |