data-display — wyrd.component.kbd

Kbd

Semantic inline presentation of a single key or keyboard shortcut combination.

Install @wyrd-company/react or the Flutter package and use it directly — your DESIGN.md does the styling.

01

Examples

Generated from the contract's examples block. Previews are the published @wyrd-company/react component, themed by the brand's role tokens — flip the site's light/dark toggle and they follow.

Code target Applies to every example on component pages.
single-key state: default
Enter
Usage
import { WyrdKbd } from "@wyrd-company/react";

<WyrdKbd keys={[{"label":"Enter"}]} />
combination state: default
Ctrl+K
Usage
import { WyrdKbd } from "@wyrd-company/react";

<WyrdKbd keys={[{"label":"Ctrl"},{"label":"K"}]} />
alternate-separator state: default
Shift P
Usage
import { WyrdKbd } from "@wyrd-company/react";

<WyrdKbd keys={[{"label":"⌘"},{"label":"Shift"},{"label":"P"}]} separator=" " />
02

Properties

NameTypeDefaultSummary
keys array undefined Ordered key labels in the shortcut.
separator string + Symbol displayed between key labels in a combination.
03

Tokens

The contract's token bindings. Open the shared contextual sidebar from any example; primary swatches reflect the color you pick there. Error swatches show the active preset's values; editing any knob switches to custom and resets error to TWW · Ink.

BindingToken
background color.surface-container
foreground color.on-surface
border-color color.outline
radius rounded.sm
text typography.code-md
04

States

StateSourceSummary
default platform A single key or key combination.
05

Accessibility

From the contract's accessibility obligations. Role none

  • Web renders a semantic kbd root containing a kbd element for each key label.
  • The component adds no interactive role or keyboard behavior.
  • Key labels and separators remain available to accessibility APIs in visual order.
  • Verified under: rtl, density-compact, text-expansion.
06

SDUI

Status: serializable. Kbd serializes ordered key labels and its separator. It owns no localizable strings; the symbolic default separator is non-linguistic.

SerializableMembers
Propertieskeys, separator
Slots
Events
The Wyrding Way — a contract-first design system. © Wyrd Company