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

PropTypeDefaultDescription
openboolean-Whether the palette is visible
onClose() => void-Called on Escape, backdrop click or after a selection
itemsCommandItem[]-{ id, label, keywords?, group?, icon?, shortcut?, onSelect }
placeholderstring"Type a command or search…"Input placeholder
hotkeybooleantrueToggle with Cmd/Ctrl+K (requires onOpenChange)
onOpenChange(open: boolean) => void-Called by the hotkey