The component can be imported via:
The hotkey prop accepts TanStack Hotkeys notation. Mod maps to ⌘ on macOS and Ctrl on Windows/Linux.
Use the isInverted prop for a dark variant, suitable for inverted or dark-mode contexts.
The component extends Text and uses the product-code text style. It scales to match the surrounding font size, so it works inline with headings and body text alike.
The component renders as a <kbd> element and can be placed inline with text.
Press Ctrl+S to save your changes.
Use the platform prop to force a specific platform's display, regardless of the user's OS.
PlumaKeyboardShortcut extends TextThe text color. (See text color tokens)
The font family. (See font family tokens)
The font style. (See MDN font-style)
The hotkey string to display (e.g., "Mod+S", "Mod+Shift+Z", "Control+Alt+D"). Uses TanStack Hotkeys notation where "Mod" maps to ⌘ on macOS and Ctrl on Windows/Linux.
Type-safe: provides autocomplete for all valid key combinations including single keys, modifier+key combos, and multi-modifier combos.
Whether to render the inverted (dark) variant.
Override automatic platform detection. By default, the component detects the user's OS and formats accordingly.
The text size. (See font size tokens)
A predefined typography style. (See text tokens)