DocsSupportPricing
Roadmap (has updates coming soon)XFigma3.6K
Sign inGet All-Access
  1. Components
  2. Kbd

Shadcn Kbd

629 Pro blocksShare

Browse 6 production-ready shadcn kbd components for displaying keyboard shortcuts, command hints, and hotkey references. Shadcn Kbd is compatible with Radix UI and Base UI components and is fully aligned with Shadcn Create style options so your previews match your design tokens.

Shadcn Kbd: Keyboard Shortcuts and Commands

Shadcn Kbd is a semantic component for displaying keyboard keys and key combinations. It maps to HTML kbd semantics while providing Tailwind styling and Radix compatibility, and aligns with Shadcn Create style options.

It renders keyboard shortcuts, command hints, and hotkey references in a consistent, recognizable style so users discover keyboard navigation without tooltips.

ReUI lists kbd components in help sections, command palettes, and documentation so you evaluate spacing, grouping, and context next to a Shadcn Button or Shadcn Tooltip. The sections below cover what it is, why teams use it, and integration components.

What is Shadcn Kbd?

In UI terms, a kbd is a semantic element that renders keyboard key or key combination. Shadcn Kbd wraps the HTML kbd element with Tailwind styling so shortcuts look polished and recognizable.

Components here show single keys (Enter, Esc), modifier combinations (Cmd+K, Ctrl+Shift+P), and groups of related shortcuts. They help you decide key styling, spacing, and placement before documenting commands in help, settings, or command palettes.

Why Use Shadcn Kbd?

Kbds teach users about keyboard shortcuts without interrupting their flow. A quick visual reference (Cmd+K) is clearer than prose ("press Command and K together"). Teams use them in help sections, tooltips, and in-app command hints to make power-user features discoverable.

The layouts on this page combine kbd elements with Shadcn Button hints, Shadcn Tooltip, and Shadcn Command palettes.

Shadcn Kbd Features

  • Semantic HTML. Uses the HTML kbd element so search engines and assistive tech recognize it as keyboard input.
  • Single and Combined Keys. Display single keys (Enter) or combinations (Cmd+K) with proper spacing and separators.
  • KbdGroup for Organization. Group related shortcuts together so documentation stays scannable and organized.
  • Tailwind Styling. Background, border, and typography respect Shadcn Create tokens so keys match your design system.
  • Integration with Buttons and Tooltips. Pair with Shadcn Button titles or Shadcn Tooltip content to hint at available shortcuts.

Integrating with Other Components

Add kbd elements inside Shadcn Button title attributes to hint at keyboard shortcuts. Use Shadcn Tooltip to display fuller shortcut hints on hover or focus.

Display kbd groups in a Shadcn Card help section or inside a Shadcn Dialog for a dedicated shortcuts reference. Pair with prose and Shadcn Accordion to organize shortcuts by category.

Use kbd in a Shadcn Command palette to show available shortcuts. Combine with Shadcn Input search to filter commands and links to actions.

Frequently Asked Questions

Should I use the semantic kbd element or just style text visually?

Always use kbd for semantic value. Screen readers can understand they are keyboard controls, search engines can index them properly, and your design system can style them consistently. Plain text feels inconsistent.

How do I display Mac (Cmd) and Windows (Ctrl) shortcuts together?

Check the user's platform (navigator.platform or useEffect) and render the appropriate key (Cmd vs Ctrl). Some apps show both with a slash (Cmd/Ctrl+K) for clarity, though this can feel cluttered. A single platform-appropriate version is usually better.

What is the best placement for keyboard shortcut hints on a button?

Display shortcuts in button title attributes or a Shadcn Tooltip on hover. This pairs the visual action with its keyboard equivalent without cluttering the button label. Command palettes and help documentation can show comprehensive lists.

Can I render a kbd inside a tooltip or button?

Yes. Render kbd inside a Shadcn Button title attribute or a Shadcn Tooltip to show the shortcut hint. This visually pairs the action with its keyboard equivalent and teaches users shortcuts through exploration.

Is the Shadcn Kbd component accessible for all users?

Yes. The semantic kbd element tells assistive tech it's a keyboard control. You still need to verify that the keyboard shortcut actually works (wired correctly in your app) and that documentation is clear. Avoid relying on kbd alone without prose context.

How do ReUI kbd components differ from a minimal single-key example?

ReUI shows kbd in command palettes, help sections, and button tooltips. You see grouping, platform variants, and integration with Shadcn Button and Shadcn Tooltip together, which is closer to production documentation.
Previous6 Shadcn Kanban Components
Next13 Shadcn Label Components

Start building with ReUI Pro today.

Every Pro block, every style, and every future addition, with one license for unlimited projects.

Get All-Access

From $249, once. Lifetime updates.

Application

  • App Shell
  • Auth
  • Card
  • ChartAdded 17 Chart blocks for cron jobs, deploys, firewall traffic and SLOs
  • Dashboard
  • Dialog
  • Empty State
  • Event Calendar
  • Flow
  • Form
  • Gantt
  • Kanban Board
  • List
  • Navbar
  • Onboarding
  • Profile
  • Rich Text EditorNew Rich Text Editor category with 5 Tiptap editor blocks
  • Schedule
  • Settings
  • SheetAdded 13 Sheet blocks for cron jobs, deploys, firewall rules, SLOs and data
  • Stats
  • Timeline
  • WhiteboardNew Whiteboard category with 2 Excalidraw board blocks
  • Wizard

Solutions

  • Dev OpsNew Dev Ops category with 6 platform console blocks
  • AI Ops
  • CRMAdded 2 CRM blocks: a forecast call workspace and a deal desk
  • Agents
  • Analytics
  • Billing
  • Bookings
  • Files
  • Inventory
  • Users

AI & Agents

  • AI ChatAdded a corner chat popup block
  • Agent Activity

Templates

  • E-commerce
  • SaaS
  • Dashboard
  • Landing
  • All templates

eCommerce

  • Category Card
  • Checkout
  • Comparison
  • Coupon
  • Filter Sidebar
  • Product Card
  • Product Detail
  • Product Grid
  • Receipt
  • Review
  • Shopping Cart
  • Wishlist
  • Shop Hero

Data Grid

  • Base
  • Columns
  • Drag & Drop
  • EditingAdded a spreadsheet reorder plan Data Grid block
  • Expansion
  • Filtering
  • Grouping
  • Virtualization

Marketing

  • Blog
  • Compare
  • Contact
  • CTA
  • FAQ
  • Hero
  • How It Works
  • PricingAdded 7 Pricing blocks: plan cards, comparison tables and upgrade dialogs

Resources

  • Components
  • Blocks
  • Icons
  • MCP for Agents
  • Docs
  • Support
  • Pricing
  • Tailwind Plus Alternative
  • Roadmap(has updates coming soon)
  • AffiliateSoon

Legal

  • Privacy Policy
  • Terms & Conditions
  • License
  • Refunds
  • Cookies

© 2026 ReUI. All rights reserved.

3.6K

Basic keyboard keys.

Keyboard keys grouped together.

Keyboard keys combined with icons.

Keyboard key within an input.

Keyboard shortcut in a tooltip.

Keyboard shortcuts reference list