NV-05Navigation
Command Palette
⌘K command palette with nested pages, fuzzy matching and in-row progress for running actions.
PROSearching your docs? Docs Search is in Kokonut UI Pro
Installation
Command Palette is a free, open-source React component in the Kokonut UI Navigation collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/action-search-bar.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/action-search-barOr add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/action-search-bar.tsx.
npm install lucide-react motionUsage
import ActionSearchBar from "@/components/kokonutui/action-search-bar";
export default function Example() {
return <ActionSearchBar />;
}Props
itemsCommandItem[]Default sampleItemsdefaultRecentstring[]Default ["copy-link", "theme-dark"]Ids shown under "Recent" before anything is typed. Running a row adds it.
onSelect(item: CommandItem, path: CommandItem[]) => unknownCalled when a row without children is chosen. Return a Promise to show a spinner in the row until it settles; a rejection leaves the palette open.
onOpenChange(open: boolean) => voiddefaultOpenbooleanDefault falseshortcutbooleanDefault false⌘K / Ctrl+K toggles the palette. By default it only does so while the palette is focused or hovered, so the host page keeps its own ⌘K. Set true to take ⌘K page-wide whenever the palette is on screen.
labelstringDefault "Search commands"placeholderstringDefault "Search or jump to…"classNamestringExtra classes for the root element.
CommandItem
idrequiredstringlabelrequiredstringiconReactNodegroupstringSection heading on its page, such as "Actions" or "Links".
keywordsstring[]Extra words the row matches on, without being shown.
shortcutstring[]Keys shown at the end of the row, such as ["⌘", "N"].
hrefstringMarks the row as a link. onSelect decides how to open it.
childrenCommandItem[]Choosing the row opens these as a nested page instead of running it.
placeholderstringInput placeholder while this item's page is open.
Dependencies
| Needs | Version | Comes from |
|---|---|---|
lucide-react | ^0.556.0 | npm, installed by the CLI |
motion | ^12.23.25 | npm, installed by the CLI |
cn from lib/utils.ts | shadcn init | |
| React | 19 | Your app |
| Tailwind CSS | 4 | Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.

