Kbd @astryx-svelte/core v0.3.0 · Kbd

Usage

Renders a keyboard shortcut as styled key badges. Use Kbd in tooltips, menus, and help text to show key combinations.
ts
import { Kbd } from '@astryx-svelte/core';

Best practices

GuidancePractices
DoPlace shortcuts near the action they trigger: in a tooltip, menu item, or inline instruction.
DoUse mod instead of ctrl or cmd; it automatically adapts to the user's platform.
Don'tUse Kbd as the only way to discover an action; shortcuts should supplement visible controls, not replace them.

Examples

Common configurations, variations, and states.
Kbd — Inline Instructions
Keyboard shortcuts rendered inline within instructional text
Kbd — Menu Shortcuts
Menu-style list pairing action labels with their keyboard shortcuts
Kbd — Modifier Combinations
Modifier combinations and special keys rendered as shortcut badges