Skip to content

Kbd

Combinations

Loading...

<flint-kbd>

Displays a single keyboard key or modifier symbol. Renders a semantic <kbd> element for accessibility.

  • Tag: <flint-kbd>
  • Class: FlintKbd

Import

ts
import 'flint-ui'; // auto-registers all
// or
import { FlintKbd } from 'flint-ui';

Usage

html
<flint-kbd></flint-kbd>

Properties

PropertyAttributeTypeDefaultDescription
sizesize'sm' | 'default' | 'lg''default'Visual size of the key.
variantvariant'raised' | 'flat''raised'Visual style: raised (default, bottom border + shadow) or flat (no raised effect).
labellabelstring''Accessible label forwarded as aria-label on the inner &lt;kbd&gt; element. Useful for symbol keys like ⌘.

Slots

NameDescription
(default)Key label: text, symbol (⌘ ⇧ ⌥ ⌃ ⏎), or any inline content.

CSS Custom Properties

PropertyDefault
--flint-kbd-group-gap4px
--flint-kbd-font-familyflint-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace
--flint-kbd-colorvar(--flint-label-color
--flint-kbd-bgvar(--flint-surface-2
--flint-kbd-border-colorvar(--flint-border-color
--flint-kbd-radiusvar(--flint-border-radius-sm
--flint-kbd-shadow-colorvar(--flint-input-border-color

<flint-kbd-group>

Groups multiple flint-kbd elements in a row. Provides a flex container with tight spacing for key combos.

  • Tag: <flint-kbd-group>
  • Class: FlintKbdGroup

Import

ts
import 'flint-ui'; // auto-registers all
// or
import { FlintKbdGroup } from 'flint-ui';

Usage

html
<flint-kbd-group></flint-kbd-group>

Slots

NameDescription
(default)flint-kbd elements, separators (e.g. &lt;span&gt;+&lt;/span&gt;), or text.

CSS Custom Properties

PropertyDefault
--flint-kbd-group-gap4px