VHotkey API
name | type | default |
|---|---|---|
string | number | boolean | false | |
Applies utility border classes to the component. To use it, you need to omit the | ||
string
| undefined | |
Applies specified color to the control - supports utility colors with or without | ||
boolean
| false | |
Applies a disabled visual state to the component. | ||
'symbol' | 'text' | 'icon' | 'icon' | |
Controls how keyboard keys are visually represented. Affects the entire component’s appearance:
| ||
string | number | undefined | |
Designates an elevation applied to the component between 0 and 5. You can find more information on the elevation page. | ||
boolean
| false | |
Optimizes the component for seamless integration within text content and documentation. Applies compact styling with baseline alignment, constrained height (1lh), and responsive typography that inherits from parent text. Ideal for help documentation, tooltips, and instructional content. When using multiple inline hotkeys in the same paragraph, increase line-height to prevent visual overlap on text wrapping. | ||
unknown
| { ctrl: { mac: {symbol: '⌃', icon: '$ctrl', text: '$vuetify.hotkey.ctrl'}, default: {text: 'Ctrl'} }, meta: { mac: { symbol: '⌘', icon: '$command', text: '$vuetify.hotkey.command' }, default: {text: 'Ctrl'} }, cmd: { mac: { symbol: '⌘', icon: '$command', text: '$vuetify.hotkey.command' }, default: {text: 'Ctrl'} }, shift: { mac: {symbol: '⇧', icon: '$shift', text: '$vuetify.hotkey.shift'}, default: {text: 'Shift'} }, alt: { mac: {symbol: '⌥', icon: '$alt', text: '$vuetify.hotkey.option'}, default: {text: 'Alt'} }, enter: { default: {symbol: '↵', icon: '$enter', text: '$vuetify.hotkey.enter'} }, arrowup: { default: { symbol: '↑', icon: '$arrowup', text: '$vuetify.hotkey.upArrow' } }, arrowdown: { default: { symbol: '↓', icon: '$arrowdown', text: '$vuetify.hotkey.downArrow' } }, arrowleft: { default: { symbol: '←', icon: '$arrowleft', text: '$vuetify.hotkey.leftArrow' } }, arrowright: { default: { symbol: '→', icon: '$arrowright', text: '$vuetify.hotkey.rightArrow' } }, backspace: { default: { symbol: '⌫', icon: '$backspace', text: '$vuetify.hotkey.backspace' } }, escape: {default: {text: '$vuetify.hotkey.escape'}}, ' ': { mac: {symbol: '␣', icon: '$space', text: '$vuetify.hotkey.space'}, default: {text: '$vuetify.hotkey.space'} }, '-': {default: {text: '-'}}, '+': {default: {text: '+'}} } | |
Custom key mapping object that defines how individual keys should be displayed. Users can import and modify the exported Usage Example: This enables:
Recommended to set at the application level via component defaults rather than per-instance for consistency. | ||
string
| undefined | |
String representing keyboard shortcuts to display. Supports multiple formats:
Supports platform-aware key names like | ||
'auto' | 'pc' | 'mac' | 'auto' | |
Controls platform-specific rendering behavior for keyboard shortcuts. Accepts three values:
This is particularly useful for:
| ||
string
| undefined | |
Text to display before the hotkey. | ||
string | number | boolean | undefined | |
Designates the border-radius applied to the component. This can be 0, xs, sm, true, lg, xl, pill, circle, and shaped. Find more information on available border radius classes on the Border Radius page. | ||
string
| undefined | |
Text to display after the hotkey. | ||
string
| undefined | |
Specify a theme for this component and all of its children. | ||
boolean
| false | |
Removes any applied border-radius from the component. | ||
| 'flat' | 'text' | 'elevated' | 'tonal' | 'outlined' | 'plain' | 'contained' | 'elevated' | |
Controls the visual style and presentation of the hotkey component. Supports standard Vuetify variants plus a special contained variant: Standard Variants (apply styling to individual key elements):
Special Variant (different visual structure):
| ||
The default Vue slot. Not supported. | ||
name | default |
|---|---|
rgb(var(--v-theme-surface)) | |
tools.theme-color('on-surface', var(--v-high-emphasis-opacity)) | |
2px | |
0.2rem 4px | |
2px | |
2px | |
0.26 | |
1em | |
var(--v-medium-emphasis-opacity) | |
1 | |
0.75rem | |
4px | |
0.75rem | |
1em | |
1em | |
calc(1ex + 2px) | |
vkbd.$kbd-min-width | |
1px 4px 0 | |
1.5 | |
1.5em | |
0.2rem | |
.62 | |
var(--v-high-emphasis-opacity) | |
normal | |
var(--v-medium-emphasis-opacity) | |
( $hotkey-background, $hotkey-color, $hotkey-elevation, $hotkey-plain-opacity, 'v-hotkey' ) |