Skip to main content

KeyboardShortcut

Use the KeyboardShortcut to display one or more keys that represent a keyboard shortcut for a specific action.

Import

import { KeyboardShortcut } from '@dynatrace/strato-components/content';

Demo

Specify the key sequence using the aria-keyshortcuts format: one or more modifier keys joined by a plus sign, followed by a non-modifier key (for example, Control+S). When multiple alternative combinations are defined, only the first is displayed.

Disable component

The KeyboardShortcut component can also be displayed in a disabled state. By setting the disabled attribute, the styling is adjusted accordingly and the aria-disabled attribute is applied to indicate that the shortcut is currently disabled.

Change variant

Use the variant prop to define if the component should be rendered using the default or minimal styling.

Still have questions?
Find answers in the Dynatrace Community