component
kbd
Styles Text as a keycap for shortcuts.
keyboardshortcutkeycaphintshadcn

On iPad
The same installed source at a regular width. It adapts its layout without a separate design.


Install
With the sweetui tool (brew install mangobyte-dev/tap/sweetui):
sweetui install kbd --destination Sources/YourFeature/ComponentsInstalls in order: kbd 0.1.2. Point --destination at a folder inside the consuming target's sources.
Usage
Text(verbatim: "⌘K")
.registryKeycap(accessibilityLabel: Text("Command K"))
Text(verbatim: "esc")
.registryKeycap()Accessibility contract
- Hidden unless accessibilityLabel given.
- One line, intrinsic size. MUST NOT wrap.
- Uses badge's compact radius, surface, border, spacing tokens.
Details
| Kind | component |
| Version | 0.1.2 |
| Platforms | iOS 26.0+ |
| Dependencies | none |
| Source | Registry/sources/components/RegistryKeycapModifier.swift |
| Xcode preview | Keycap |