Skip to main content

Hotkey()

Hotkey(__namedParameters): Element

Hotkey - A visual representation of keyboard shortcuts and key combinations

Displays keyboard keys and shortcuts in a consistent, accessible format. Perfect for documentation, help systems, or UI elements that need to show keyboard shortcuts. Supports multiple visual styles including outlined keys, flat presentation, and icon-specific formatting.

Parameters

__namedParameters

HotkeyProps

Returns

Element

Examples

// Basic hotkey display
<Hotkey>Ctrl</Hotkey>
// Hotkey combination with different variants
<HotkeySet>
<Hotkey variant="outline">Cmd</Hotkey>
<span>+</span>
<Hotkey variant="outline">K</Hotkey>
</HotkeySet>
// Flat style for inline text
<p>Press <Hotkey variant="flat">Enter</Hotkey> to submit</p>
// Icon variant for special keys
<HotkeySet>
<Hotkey variant="icon"></Hotkey>
<Hotkey>Space</Hotkey>
</HotkeySet>