CommandPalette
A modal command palette overlay with fuzzy search, grouped results, match highlighting, keyboard navigation, and focus trap.
Installation
npx dafink-ui add command-paletteAlso installs: Scroll-fade
Demo
Press Esc to close
Composition
<CommandPalette>
</CommandPalette>
Props
| Name | Type | Default | Description |
|---|---|---|---|
| open | boolean | - | Whether the palette is visible. |
| onClose | () => void | - | Called when the user presses Escape, clicks the backdrop, or activates an item. |
| placeholder | string | 'Search commands…' | Placeholder text in the search input. |
| children | ReactNode | - | CommandGroup and CommandItem elements. |