content

Tailwind CSS keyboard

The Keyboard component is used to display keyboard shortcuts.

Class Name
Type
Description
kbdComponentBase class for the keyboard component.
kbd-xsResponsiveKeyboard with extra small size.
kbd-smResponsiveKeyboard with small size.
kbd-lgResponsiveKeyboard with large size.

Use the component class kbd to display the keyboard shortcut.

Add responsive class kbd-{size} where {size} = xs|sm|lg for different sizes.

Use kbd’s in text to illustrate keyboard shortcuts.

Use the + sign to display key combinations.

Use special characters to display function keys.

Use the flex and justify-center utility classes to display a full keyboard.

Use the flex and justify-center utility classes to display arrow keys.

Use kbd with numbers to display number keys.