zynactradocs

Kbd

A keyboard key or shortcut, set in the theme's mono font.

⌘⇧⌥⌃

Press Ctrl+K to open the command menu.

Usage

import { Kbd, KbdGroup } from "@zynactra/ui/kbd"
<KbdGroup>
  <Kbd>⌘</Kbd>
  <Kbd>K</Kbd>
</KbdGroup>

Guidelines

  • One key per Kbd, combinations in a KbdGroup.
  • Use symbols on macOS (⌘ ⇧ ⌥ ⌃) and words elsewhere (Ctrl, Shift). If you can't detect the platform, use words.
  • Shortcuts in menus go in DropdownMenuShortcut, not Kbd.
Edit on GitHub

On this page