CommandPalette

A modal command palette overlay with fuzzy search, grouped results, match highlighting, keyboard navigation, and focus trap.

Installation

npx dafink-ui add command-palette

Also installs: Scroll-fade

Demo

Press Esc to close

Composition

<CommandPalette>
<CommandGroup>
<CommandItem />
</CommandGroup>
</CommandPalette>

Props

NameTypeDefaultDescription
openboolean-Whether the palette is visible.
onClose() => void-Called when the user presses Escape, clicks the backdrop, or activates an item.
placeholderstring'Search commands…'Placeholder text in the search input.
childrenReactNode-CommandGroup and CommandItem elements.