KbdGroup
Display a multi-key shortcut with shared styling.
Anatomy#
Separator content is inline and is not a theme slot.
Usage#
Use KbdGroup to display keys pressed together, such as Ctrl + K. It renders notation only; the application owns the shortcut listener. For a single keycap, use Kbd.
Key labels#
Each item is a key string, resolved like the value of Kbd, or a Kbd props
object with value. Known aliases resolve to symbol notation and spoken names. Use an object to set
aria-label, symbol, or translations for one key. The group’s size and variant apply to
every key.
Separator#
separator defaults to "+" and accepts a string or number for inline notation. For custom JSX,
pass a component that receives the index of the key it follows; each position mounts its own
instance. It is unrelated to the layout Separator.
Examples#
Label save and format shortcuts#
Place the group beside the command it describes. Alias keys resolve to platform symbols by default.
Show a chord with a custom divider#
Pass a separator component when the notation should not use +.
API Reference#
Props#
Props for the KbdGroup component. Renders a <kbd> element by default.