Text | Kbd
Kbd#
Description#
- Component that draws a key or a key combination (
Ctrl+S) using a real HTML<kbd>, with one<kbd>per key inside a grouping<kbd>, as recommended by the standard.
Props#
keys(readonly string[]) — The keys of the combination, already translated (“Ctrl”, “Shift”). Default:[].label(string) — Alternative text read aloud instead of the combination, if joining with “+” is not enough.
Usage#
| |
Notes#
- With
keysthe combination is drawn separated by+, which a screen reader announces (“Ctrl plus S”). - With
labelpresent, that text is hidden from view (sr-only) and the drawn content is announced as decorative. - Without
keysthe content comes from the default slot.