Kbd

The Kbd component is used to display which key or combination of keys performs a given action.

When To Use

  • Used for recognizing keyboard inputs by means of a visual key representation.
  • When displaying keyboard shortcuts to users.

Example Usage

Use the component to represent keys or combinations.

Press ⌘ + C to copy.

Variants

Sizes

The Kbd component supports different sizes: `sm`, `md`, and `lg`.

Ctrl Ctrl Ctrl

Intents

The Kbd component supports different visual intents: `default`, `outline`, and `ghost`.

Default Outline Ghost

API Reference

Property
Description
Type
Default

size

Size of the keyboard key. 'sm' | 'md' | 'lg' 'md'

intent

Visual style of the keyboard key. 'default' | 'outline' | 'ghost' 'default'

class

Additional CSS classes to apply. string -