A ⌘K palette with live filtering, grouped results and a highlight that glides between them.
A ⌘K command palette with recent actions, fuzzy search across pages and commands, and scope tabs.
Customize
Usage
import { useRouter } from "next/navigation";
import { CommandCentre } from "@/components/motionkit/command-centre";
const router = useRouter();
<CommandCentre
onNavigate={router.push}
pages={[
{ label: "Dashboard", href: "/dashboard", description: "Overview and key metrics" },
{ label: "Billing", href: "/settings/billing", keywords: ["invoice"] },
]}
commands={[
{ id: "new", label: "New project", group: "Create", shortcut: "⌘N", onSelect: createProject },
{ id: "deploy", label: "Deploy to production", group: "Actions", keywords: ["ship"], onSelect: deploy },
]}
/>Motion
The exact curves this component runs, plotted with Motion's own maths.
Dialog in
Opened
Highlight glide
Arrow keys or hover
Scope switch
Tab or click
Larger web apps that need a full command palette: recent actions, search across pages and commands, and scope tabs.
Every entry is ranked against the query: an exact prefix first, then a word start, then a substring, then letters in order, with tighter matches scoring higher. Recent actions are kept in localStorage and lead when the search is empty. Tab switches scope, the first Escape clears the search and the second closes it, and the platform's shortcut label (⌘ or Ctrl) is set after hydration.
| Prop | Type | Default | Description |
|---|---|---|---|
| commands | CommandAction[] | — | { id, label, onSelect, group?, icon?, shortcut?, keywords? } |
| pages | CommandPage[] | — | { label, href, description?, icon?, keywords? } |
| onNavigate | (href: string) => void | window.location.assign | Opens a page. Pass your router's push for client-side navigation. |
| hotkey | string | false | "k" | Letter that opens it with ⌘ or Ctrl. false for none. |
| storageKey | string | null | "motionkit-command-centre" | localStorage key for recent actions. null turns recents off. |
| recentLimit | number | 5 | How many recent actions to remember. |
| placeholder | string | "Search pages and commands…" | Search box placeholder. |
| triggerLabel | string | "Search" | Text on the trigger button. |
How we audit: the WCAG 2.2 animation checklist and respecting reduced motion in React.
Yes. The file starts with "use client", so you can import it straight into a Server Component page or layout. It works in Vite as is, and in Astro as a React island.
Only the motion package, beside React and Tailwind CSS v4. There is no MotionKit package and no Tailwind config to add.
Yes, with MotionKit Plus. Add the @motionkit registry and your personal token to components.json (the snippet is on your account page), then run npx shadcn@latest add @motionkit/command-centre. It saves the file to components/motionkit and installs its dependencies.
Command Centre is part of MotionKit Plus (£12 / $15 / €14 a month or £96 / $120 / €112 a year). The live preview and playground are free to explore; Plus unlocks its source code, every customisation control and commercial use.
With reduced motion on, the dialog fades only, and the highlight and scope tabs jump instead of gliding.
Press ⌘K on a Mac or Ctrl+K elsewhere, or click its trigger button. Change the letter with the hotkey prop, or set it to false to turn the shortcut off.
Yes. Pass your router's push function as onNavigate, and choosing a page navigates client-side instead of reloading.
A ⌘K palette with live filtering, grouped results and a highlight that glides between them.
Accessible tabs with a sliding indicator and soft content transitions.
A floating icon bar that magnifies and lifts around the pointer, with tooltips and a gliding active indicator.
The live preview is free to explore. Plus unlocks the source for Command Centre and every other premium component.
Not ready for Plus? A free account unlocks 4 premium components, Depth Card, Rolling Text, Dot Wave and Confetti Button, with no card needed.
Customize
Usage
import { useRouter } from "next/navigation";
import { CommandCentre } from "@/components/motionkit/command-centre";
const router = useRouter();
<CommandCentre
onNavigate={router.push}
pages={[
{ label: "Dashboard", href: "/dashboard", description: "Overview and key metrics" },
{ label: "Billing", href: "/settings/billing", keywords: ["invoice"] },
]}
commands={[
{ id: "new", label: "New project", group: "Create", shortcut: "⌘N", onSelect: createProject },
{ id: "deploy", label: "Deploy to production", group: "Actions", keywords: ["ship"], onSelect: deploy },
]}
/>Motion
The exact curves this component runs, plotted with Motion's own maths.
Dialog in
Opened
Highlight glide
Arrow keys or hover
Scope switch
Tab or click