Skip to content

shadcn.io is an independent project built on shadcn/ui

Free

Large Kbd for Solid

Large ⌘ and K caps, 32 pixels tall with base-size type, when a shortcut should stand out from the surrounding text.

UI library: Ark UI

Both keys in the ⌘K group are 32 pixels tall, with base type and a little horizontal padding. The chord is a label. It does not listen for keys.

Use large caps in onboarding or a shortcut legend. In a toolbar, the default size beside a Button is enough. In Solid, Ark UI does not fire ⌘K.

Preview

Preview width

Installation

MCP · Pro
Make your AI a shadcn expert
Your agent installs components, builds pages and restyles your app from one prompt, in Claude Code, Cursor or VS Code.
Part of Pro

Anatomy

Kbd anatomy: kbd, group

Usage

<div class="rounded-md border bg-background p-4">
    <KbdGroup>
      <Kbd class="h-8 min-w-8 px-2 text-base">⌘</Kbd>
      <Kbd class="h-8 min-w-8 px-2 text-base">K</Kbd>
    </KbdGroup>
  </div>

FAQ

When should I use large key caps?

When the shortcut is the content rather than a hint beside it: a callout that teaches a shortcut, an onboarding screen, a cheat sheet, a slide. Next to a menu item or a button, the default size fits better.

What dimensions work for large key caps?

This example uses a 32-pixel height and minimum width with base-size text and a little more padding. Keep the height and minimum width equal so single characters stay square, and scale the text with them.

How do I use large key caps for visual hierarchy?

Use one large shortcut as the focal point and keep the rest of the page's shortcuts at the default size. Several large shortcuts compete with each other and the headings.

Are large key caps more accessible?

They're easier to read for people with low vision and from a distance. They don't change what screen readers hear, which is the text inside each cap.

Should I use large key caps on mobile?

Phones rarely have a hardware keyboard, so shortcut hints matter less there. If you show them, large caps take a lot of width; consider hiding shortcut hints on small screens instead.

Do large key caps work better in screenshots and videos?

Yes. Screenshots get scaled down and videos compressed, and a 32-pixel cap survives both better than a default one.

API Reference

Kbd

No extra props in this demo. The rest is on the Kbd page.