shadcn.io is not affiliated with official shadcn/ui
Centered Command Palette Mockup Hero Block for React
A showcase hero for a keyboard-first issue tracker: a centred headline and two calls to action over a command palette drawn in a hairline frame.
Installation
Overview
A showcase hero with a command palette sketch below it. A release link, a bold two-line headline and a subtitle that names the shortcut sit above two calls to action, a Shine Button and an outline Button. Underneath, the palette is drawn in greyscale inside a hairline frame with + marks on its top corners, its side lines fading out together with the palette's last rows. It has a search bar and two groups, Suggestions and Go to, with seven commands, each with its icon and key caps, sliding in one after another. It's written for Cinder, a made-up keyboard-first issue tracker. It's built from Announcement, Guides, Kbd, Shine Button, Button and Status, with CSS transitions for the entrance and your theme's tokens for every colour. For developer tools, productivity apps, and any SaaS that sells keyboard shortcuts and speed.
FAQ
How do I change the commands in the palette?
Edit GROUPS at the top of the file. Each group has a name and its commands; each command has a Lucide icon, a label and its keys, one key cap each in the order they're pressed, so ["⌘", "⇧", "."] draws three caps. Shortcuts read left to right in every layout, right-to-left ones included. The first command of the first group is drawn as the selected one. A long label shortens with an ellipsis rather than pushing its keys off the row.
Can visitors use the palette?
No: it's a picture of one, so it has no input and nothing in it can be clicked or focused. For a palette that works, open our Command in a dialog from the secondary button and from ⌘K and Ctrl K; the Command docs have a palette example that listens for both. Keep the sketch, or swap it for a button that opens the real thing.
What about Windows and Linux, where there's no ⌘ key?
The subtitle and the sketch show the Mac keys, as most keyboard-first products do in their marketing. If your audience is mostly on Windows or Linux, change ⌘ to Ctrl in the subtitle, its sr-only "Command K" and the sketch's key caps, and make sure your real shortcut answers to both metaKey and ctrlKey.
How does a screen reader read this hero?
The headline is the page's one h1, and the subtitle reads "Press Command K to create, assign and jump anywhere in Cinder": the key caps are hidden and an sr-only "Command K" says them, since a screen reader may read ⌘ as "place of interest sign". The palette sketch is decoration, hidden from screen readers and made inert, so Tab goes from the two links straight past it.
How does it fit on a phone?
The headline balances over three lines at text-4xl, and the two calls to action sit side by side or wrap, with the Shine Button on the first screen. The palette keeps its search bar and the four Suggestions, fading out at its foot; the Go to group is hidden below sm.
What moves, and can I turn it off?
The link, headline, subtitle and buttons fade and rise in, the palette rises in after them, and its commands slide in from the side you read from, one after another. It's all CSS transitions that play once on load. With reduced motion on, everything is in place from the start.
Related
- Pro
Split Search Bar Hero
Interactive demosA split hero whose call to action is a large search field with a Shine Button, popular searches, and, across a solid divider, a results panel that filters as you type.
- Pro
Install Command Snippet Hero
Code and terminalA compact centred hero for a web framework: an install command with a copy button, two calls to action and a band of three stats.
- Pro
Terminal Copy Command Hero
Code and terminalA split hero for a project scaffolder: text with a Shine Button and three stats on a ruled row, and a terminal in a hairline frame that shows the install command with a copy button and what it set up.
- Pro
Split Layout Terminal Install Hero
Code and terminalA compact reverse split hero for an SDK: a dark code window with a deploy call and its JSON response beside the headline, a copyable install command and a Shine Button, over a closing band of three ruled feature cells.
- Pro
Split Layout Tab-Switch Browser Hero
Interactive demosA showcase hero for a project workspace: the headline beside its pitch and a Shine Button, then a browser window in a hairline frame whose tabs switch between three drawn views: Projects, Analytics and Settings.
- Pro
Split Layout Dark Terminal Hero
Code and terminalA split hero for an API: the headline, a Shine Button and three ticks beside a dark terminal with a request, a status and a JSON response that writes itself out, above a band of three figures.