KBD-KEY
Source: design-system/components/KbdKey/KbdKey.tsx. React Server Component, zero client JavaScript.
Props
| Prop | Type | Default | Required |
|---|---|---|---|
Propsize | Type'sm' | 'md' | Default'md' | Requiredno |
Propchildren | TypeReactNode | Defaultnone | Requiredyes |
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.