Skip to main content
Skip to design system navigation

KBD-KEY

Source: design-system/components/KbdKey/KbdKey.tsx. React Server Component, zero client JavaScript.

Props

PropTypeDefaultRequired
PropsizeType'sm' | 'md'Default'md'Requiredno
PropchildrenTypeReactNodeDefaultnoneRequiredyes

Other <kbd> attributes (id, aria-*, data-*) pass through, and className is appended to the component's own classes.

Examples

Ctrl+KEnter

SOURCE

<KbdKey>Ctrl</KbdKey>
  <KbdKey>+</KbdKey>
  <KbdKey>K</KbdKey>
  <KbdKey size="sm">Enter</KbdKey>

Accessibility

Renders the semantic <kbd> element. Compose key chords by placing one KbdKey per key.