Join our Discord Community
Button Group/Patterns

React Button Group - Keyboard Shortcuts

Button group with keyboard shortcuts displayed using Kbd component for shortcut visibility

Looking to implement shadcn/ui patterns?

Join our Discord community for help from other developers.


Keyboard shortcuts accelerate workflows—visible shortcuts enable discovery. This React component combines shadcn/ui's Button, ButtonGroup, and Kbd components with Lucide React icons (CopyIcon, SaveIcon, DownloadIcon) displaying keyboard shortcuts within buttons. Built on Radix UI with Kbd component rendering shortcut badges (⌘C, ⌘S, ⌘E), the pattern shows shortcuts in horizontal and vertical orientations. Perfect for desktop applications like VS Code or Figma showing file operations, productivity tools displaying common actions, developer tools with frequent operations, or any power-user interface where shortcuts should be discoverable—visible shortcuts reduce learning curve, Kbd component provides consistent styling, button groups organize shortcut-enabled actions. The pattern bridges discoverable button interfaces with efficient keyboard-driven workflows.

Loading preview...

Pattern created by @haydenbleasel

Installation

npx shadcn@latest add https://www.shadcn.io/registry/button-group-patterns-4.json
npx shadcn@latest add https://www.shadcn.io/registry/button-group-patterns-4.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/button-group-patterns-4.json
bunx shadcn@latest add https://www.shadcn.io/registry/button-group-patterns-4.json

Questions you might have