Skip to content

Kbd ​

Keyboard key display element with terminal style.

Kbd

Design lines ​

Ctrl
vue
1<Tabs defaultValue="tuix">2  <TabsList>3    <Tab value="tuix">TUIX</Tab>4    <Tab value="rubik">Rubik</Tab>5  </TabsList>6  <TabPanel value="tuix">7    <Kbd design="tuix">Ctrl</Kbd>8  </TabPanel>9  <TabPanel value="rubik">10    <Kbd design="rubik">Ctrl</Kbd>11  </TabPanel>12</Tabs>

Demo ​

Basic (keys) ​

Default and colored keycaps for Ctrl, Enter and ⌘.

CtrlEnter⌘
vue
1<Kbd>Ctrl</Kbd>2<Kbd color="success">Enter</Kbd>3<Kbd color="warning">⌘</Kbd>

Props ​

color ​

Semantic color of the keycap.

TypeDefaultRequired
'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark''primary'❌

design ​

Design line (or inherit from data-design).

TypeDefaultRequired
'tuix' | 'rubik'— (inherits from data-design)❌

Slots ​

default ​

Content of the key (shortcut label).

vue
1<Kbd>Ctrl</Kbd>

CSS Custom Properties ​

TokenDefaultDescription
--font-mono"JetBrains Mono", ui-monospace, monospaceMonospace font stack for code-like content (key labels, log lines, chips).
--accentfrom theme (--ctp-latte-mauve / --ctp-mocha-mauve)Accent color, mapped from the active semantic color.
--bg-elevatedfrom theme (--ctp-latte-surface0 / --ctp-mocha-surface0)Background of floating surfaces (modals, dropdowns, popovers).
--borderfrom theme (--ctp-latte-surface0 / --ctp-mocha-surface0)Outline and divider color for surfaces.
--text-mutedfrom theme (--ctp-latte-subtext1 / --ctp-mocha-subtext1)Secondary text for hints, annotations and disabled state.

Ver Theming para la convención completa.