Skip to content

KeyHint ​

Key or keyboard shortcut with inline style.

KeyHint

Design lines ​

?
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    <KeyHint design="tuix">?</KeyHint>8  </TabPanel>9  <TabPanel value="rubik">10    <KeyHint design="rubik">?</KeyHint>11  </TabPanel>12</Tabs>

Demo ​

Basic (hint) ​

Inline hints for Ctrl+P, ⌘K, Esc and F1.

Ctrl+P⌘KEscF1
vue
1<KeyHint>Ctrl+P</KeyHint>2<KeyHint>⌘K</KeyHint>3<KeyHint size="sm">Esc</KeyHint>4<KeyHint size="md">F1</KeyHint>

Size (size) ​

The same hint in sm and md sizes.

smmd
vue
1<KeyHint size="sm">Esc</KeyHint>2<KeyHint size="md">F1</KeyHint>

Props ​

size ​

Size of the hint.

TypeDefaultRequired
'sm' | 'md''md'❌

design ​

Design line (or inherit from data-design).

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

Slots ​

SlotDescription
defaultKey hint content (text, icons, etc.).

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-panelfrom theme (--ctp-latte-surface1 / --ctp-mocha-surface1)Background of panel-like raised surfaces (cards, accordions).
--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.