Zazz Design Framework
Components

Kbd

Keyboard key hints on the native kbd element, with a group for shortcut runs.

The bare native <kbd> element renders as a key cap without needing an extra class. It sits in the reset layer, so component scopes restyle it by reassigning --ui-kbd-* tokens: keys retint inside a Tooltip and shrink inside a Button without markup changes.

Default

Loading components…

Kbd group

Wrap a run of keys forming one shortcut in <ui-kbd-group> (or .ui-kbd-group). The group controls the spacing between adjacent keys through a single --ui-kbd-group-gap token, so shortcut hints look consistent across buttons, tooltips, command palettes, and prose instead of inheriting random parent gaps.

Loading components…

Inside a Command item, a lone <kbd> or <ui-kbd-group> automatically pushes to the inline end of the row.

API

AttributeTargetValues
Tokens:root--ui-kbd-* (type, surface, metrics), --ui-kbd-group-gap
Icon<svg> child of <kbd>Sized by --ui-kbd-icon-size
Group<ui-kbd-group>, .ui-kbd-groupWraps <kbd> children; gap = --ui-kbd-group-gap

Scoped restyling works through CSS inheritance by reassigning a token on any ancestor:

.my-toolbar {
  --ui-kbd-background: var(--card);
  --ui-kbd-group-gap: var(--step-0_5);
}

On this page