ThatDesignUIOriginalInteractive preview
Command palette
A Cmd/Ctrl+K palette over a blurred app: live filtering with the match highlighted, a highlight that slides between rows, Enter to run with a toast.
- Category
- Navigation
- Platform
- Responsive
Interactive componentClick through it, resize it, or switch states. It’s real UI, not a screenshot.Closed state
Use this component
Free to use. It works on its own in any React and Tailwind project, so you can add it with one command, paste the code, or hand the prompt to your coding agent.
FreeReact 18+Tailwind v3.4 or v4No extra packages
1. Add it with the shadcn CLI
npx shadcn@latest add https://www.thatdesignui.com/r/command-palette.json2. Use it
Every prop is optionalapp/page.tsx
import CommandPalette from "@/components/command-palette";
export default function Page() {
return <CommandPalette />;
}Prefer to paste it yourself? Open the .
Under the hood
How it’s built
What’s inside
- A pale lavender app shell (#eef0f7): a sidebar with a workspace name and placeholder bars, and a top bar holding a wide search field that reads 'Search or jump to…' with a ⌘ K hint. Three skeleton cards sit below.
- Opening the palette dims and blurs the app and drops a white 34rem panel (rounded 16px, soft deep shadow) in from slightly above with a quick scale and fade. It has a large search input with an esc key hint, grouped results (Suggested, Navigate, Actions) each with a line icon, label and key hints, and a footer with the navigation hints.
- Typing filters the list and highlights the matched letters in indigo; one pale indigo bar slides between rows as the active row changes. With nothing matching it shows 'No results for …' and suggestions.
- Running a command closes the palette, returns focus to the search field and shows a dark pill toast 'Ran “…”' with a green check for about two seconds.
How it behaves
- Pressing Cmd+K or Ctrl+K toggles the palette; clicking the search field opens it; Esc or clicking the dimmed area closes it and returns focus to the field.
- Up and Down move the highlight (wrapping at the ends) and the bar slides; Enter runs the active command and shows the toast; Tab stays inside the palette.
- The input is an ARIA combobox: aria-activedescendant follows the active option and the list is a listbox with option rows.
- Typing 'inv' leaves only 'Invite a teammate' with 'inv' highlighted; typing nonsense shows the empty message.
- With reduced motion enabled the panel appears without the scale and the toast without sliding.



