Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Kbd examples · Sizes

Extra Large Kbd for React

Extra large ⌘ and K key caps, 48 pixels tall with 2xl text.

Framework
UI library

A landing page hero or a presentation slide needs a shortcut that reads from across the room. This React example sizes both keys of a ⌘K KbdGroup with h-12 min-w-12 px-3 text-2xl: 48 pixels tall, at least as wide, with 2xl type. It's a display size for the one shortcut a page is about.

Preview

Preview width
⌘K

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.

FAQ

When should I use extra large key caps?

When the shortcut is the headline: a hero that introduces a command palette, a launch page, a slide, a demo video. Anywhere else, the large or default size is enough.

What are the proportions of the extra large caps?

48 pixels tall and at least 48 wide, with 2xl type and wider padding. Height and minimum width stay equal so ⌘ and K are square, and the gap from KbdGroup stays small, so the two caps still read as one shortcut.

What contexts justify extra large key caps?

Marketing pages, feature announcements, keynote slides and screen recordings, where the shortcut is the message. In an app's own interface, they look out of scale next to everything else.

Should I use extra large caps on mobile?

Use a smaller size on narrow screens, for example by switching classes at a breakpoint. Two 48-pixel caps fit, but a longer shortcut won't, and most phones have no keyboard to press it on.

Are extra large key caps accessible?

They're easy to see, and screen readers still read the text inside each cap. As with any symbol, ⌘ alone may not be read as Command, so add the key's name as visually hidden text when it matters.

Can I use extra large caps as a brand element?

Yes. A product built around a shortcut, like a launcher or a command palette, can make the key caps part of its look. Restyle them with your brand colors through the cap's classes.