Shortcut
The keys of one shortcut, the glyph spoken by name.
<Kbd.Group>
<Kbd label="Command">⌘</Kbd>
<Kbd>K</Kbd>
</Kbd.Group>Draws a keyboard key on a keycap, alone or as one shortcut.
<Kbd>Esc</Kbd>pnpm add @usefragments/uiImport styles once from @usefragments/ui/styles. See the installation guide for framework and theme setup.
Import Kbd once, then compose its parts with dot notation.
Kbd.GroupThe keys of one shortcut, the glyph spoken by name.
<Kbd.Group>
<Kbd label="Command">⌘</Kbd>
<Kbd>K</Kbd>
</Kbd.Group>Prop | Type | Default | Description |
|---|---|---|---|
childrenRequired | React.ReactNode | Not set | The key as it is printed: a glyph or a short word |
Group.childrenRequired | React.ReactNode | Not set | The keys of one shortcut, pressed together, as `Kbd` children. |
label | string | undefined | Not set | The key's spoken name for a glyph a screen reader cannot say. The glyph is then hidden from assistive tech. |