Kbd
Displays a keyboard key or shortcut. Use it in instructions and menus to communicate available keyboard actions.
React
Ready
Figma
React examples
Default
EscEnterāKCtrlShiftM
import { Kbd, KbdGroup, Stack } from "@kela-systems/ui-components"; export default function KbdDefault() { return ( <Stack direction="row" gap={4} align="center" wrap> <Kbd>Esc</Kbd> <Kbd variant="primary">Enter</Kbd> <KbdGroup> <Kbd>ā</Kbd> <Kbd>K</Kbd> </KbdGroup> <KbdGroup separated> <Kbd>Ctrl</Kbd> <Kbd>Shift</Kbd> <Kbd>M</Kbd> </KbdGroup> </Stack> ); }
Props
Kbd
| Name | Default | Description |
|---|---|---|
variant"default" | "primary" | "default" |
It also takes the attributes of the HTML element it renders.
KbdGroup
| Name | Default | Description |
|---|---|---|
separatedboolean | false | Joins the keys with a "+" separator, e.g. Ctrl + Alt + Shift + B. |
It also takes the attributes of the HTML element it renders.
Also exported: kbdVariants (variants).