Kbd

Kbd is a pretty display for gorgeous keyboard shortcuts. It is a standalone component that can be customized for size and used for single keys or combinations.

Basic Usage

A simple keyboard shortcut display using the Kbd component.

ctrl + alt + delete
Code Example
Basic.vue

Kbd

The Kbd component renders a stylized keyboard key or shortcut. It supports size customization via boolean props or a size string prop.

Kbd Props Type Description
size
string

Sets the size to one of the following: xl, lg, md, sm, xs.

   
xl
boolean

Sets the size to xl.

   
lg
boolean

Sets the size to lg.

   
md
boolean

Sets the size to md.

   
sm
boolean

Sets the size to sm.

   
xs
boolean

Sets the size to xs.

Kbd Slots Description
default

The default slot. Content to be displayed inside the keyboard key (e.g., a letter, word, or icon).

Examples

Size

Kbd supports size via boolean props or the size prop.

xs sm md lg xl
Code Example
Size.vue

Arrow Keys

Kbd can be used to show arrow keys and can be combined for custom layouts.

◀︎▶︎
Code Example
ArrowKeys.vue