Skip to main content

Kbd

Implemented

Keyboard key indicator — 20×20 with monospace font, 1px border, 4px radius. Used in shortcuts hints.

Categoryatoms
Sourcepatterns/atoms/kbd.html
AI HintKeyboard-key glyph (kbd element) in sm/md for shortcut hints and input adornments. Presentational by design — pair it with visible text that names the shortcut.

Keyboard shortcut indicator with platform-aware glyphs. FR-CA: Indicateur de raccourci clavier.

Kbd

Display atom (Family 2 — Tier 1, placeholder)

Tier-1 placeholder. Production component ships in DS-313.

Recherche :CtrlK⌘K
Palette de commandes :Ctrl⇧P
Fermer :Échap
Soumettre :Entrée

This component supports light and dark mode.

Status

Tier-1 placeholder. Production Kbd ships in DS-313.

Intended API

import { Kbd } from '@epasslive/design-system'

<Kbd combo="Ctrl+K" platform="win" />
<Kbd combo="Cmd+K" platform="mac" />
<Kbd combo="Ctrl+Shift+P" ariaLabel="Palette de commandes" />

Accessibility

Each token is a native <kbd> element so assistive tech announces "Control plus K" naturally.

Props

Prop
Type
Default
Description
combo
string
Ctrl+K

Combo string with + separators.

platform
'mac' | 'win' | 'any'
any

Platform-aware glyph override.

ariaLabel
string
—

French description announced to assistive tech.

Props

Preview

Kbd

Prop
Type
Required
Default
Description
children
React.ReactNode
Required
—

Key label: '⌘', 'Shift', 'K', 'Enter'

size
"sm" | "md"
Optional
'md'

Visual size preset.

Quick use:<Kbd />

Accessibility

ARIA rolepresentation (decorative)

render

1 rule

NASA Rule 6

Children must be a single key label, no nesting

ARIA

1 rule

WCAG 1.1.1

Decorative wrapper — parent provides context

Usage

Import

tsxSnippet
import { Kbd } from "@epasslive/design-system"

Example 1

tsxSnippet
<Kbd />

Example 2

tsxSnippet
<Kbd variant="default" />

Anti-patterns

— Do not compose atoms directly — use molecules instead

— Avoid inline styles on atoms

Design System v4.1.0 | ePassLive