Kbd
Keyboard key chip.
kbd() renders a keyboard key chip styled with --cpd-secondary and a subtle
inner shadow.
Single keys
Section titled “Single keys”Keys
⌘ K Ctrl Shift
kbd('⌘');kbd('K');kbd('Ctrl');Combinations
Section titled “Combinations”Chord
Ctrl + Shift + P
[kbd('Ctrl'), ' + ', kbd('Shift'), ' + ', kbd('P')].join('');| Option | Type | Description |
|---|---|---|
text | string | Key label (first argument). |
- Renders as
<kbd class="cpd-kbd">; combination separators are plain text joined with string concatenation. - Use the
--cpd-font-monofamily for consistent key glyphs.