CommandPalette
Keyboard-first command menu (⌘K).
Import
tsx
import { ZCommandPalette } from "@zurto/ui";Usage
tsx
<ZCommandPalette
open={open}
onClose={() => setOpen(false)}
commands={[
{ id: "new", label: "New File", shortcut: "⌘N", action: createFile },
{ id: "save", label: "Save", shortcut: "⌘S", action: save },
]}
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
open | boolean | false | Open state |
onClose | () => void | – | Close handler |
commands | Command[] | [] | Available commands |
placeholder | string | 'Search...' | Search placeholder |