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 '@getufy/flint-ui'; // auto-registers all
// or
import { FlintKbd } from '@getufy/flint-ui';

Usage

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

Properties

PropertyAttributeTypeDefaultDescription
sizesizeSize'md'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 Parts

NameDescription
baseThe component's base wrapper element.

CSS Custom Properties

PropertyDefault
--flint-kbd-bg
--flint-kbd-border-color
--flint-kbd-color
--flint-kbd-font-family
--flint-kbd-radius
--flint-kbd-shadow-color
--flint-kbd-group-gap4px

<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 '@getufy/flint-ui'; // auto-registers all
// or
import { FlintKbdGroup } from '@getufy/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-gap