Not affiliated with official shadcn/ui. Visit ui.shadcn.com for official docs.
React Button with Kbd
A primary button with keyboard shortcut display combining filled background with command key urgency
Looking to implement shadcn/ui patterns?
Join our Discord community for help from other developers.
Shortcuts accelerate conversionsāprimary buttons teaching efficiency while driving action. This React button combines shadcn/ui's solid primary styling with the Kbd component displaying keyboard commands like āS or Ctrl+Enter within filled background. Built with gap-2 spacing and contrasting kbd styling maintaining high visibility while educating power users, it creates discoverable shortcut patterns on critical actions. Perfect for "Save āS" in editors preventing data loss through muscle memory, "Submit āEnter" in forms accelerating completion, or "Create New āN" in productivity apps teaching workflow efficiencyāthe filled shortcut combination commands attention while surfacing keyboard optimization for conversion acceleration.
Pattern created by @haydenbleasel