Kbd

Kbd is used to display keyboard shortcuts.

Examples

Kbd

A
<dv-kbd>A</dv-kbd>
vue

Kbd sizes

ShiftShiftShiftShift
<div class="space-x-2">
  <dv-kbd size="lg">Shift</dv-kbd>
  <dv-kbd size="md">Shift</dv-kbd>
  <dv-kbd size="sm">Shift</dv-kbd>
  <dv-kbd size="xs">Shift</dv-kbd>
</div>
vue

In text

Press F to pay respects.

<p> Press <dv-kbd size="sm">F</dv-kbd> to pay respects. </p>
vue

Key combination

ctrl + shift + del

<p>
  <dv-kbd>ctrl</dv-kbd>
  +
  <dv-kbd>shift</dv-kbd>
  +
  <dv-kbd>del</dv-kbd>
</p>
vue

Function Keys

<div class="space-x-2">
  <dv-kbd></dv-kbd>
  <dv-kbd></dv-kbd>
  <dv-kbd></dv-kbd>
  <dv-kbd></dv-kbd>
</div>
vue

A full keyboard

qwertyuiop
asdfghjkl
zxcvbnm/
<div class="flex justify-center gap-1 my-1 w-full">
  <dv-kbd>q</dv-kbd>
  <dv-kbd>w</dv-kbd>
  <dv-kbd>e</dv-kbd>
  <dv-kbd>r</dv-kbd>
  <dv-kbd>t</dv-kbd>
  <dv-kbd>y</dv-kbd>
  <dv-kbd>u</dv-kbd>
  <dv-kbd>i</dv-kbd>
  <dv-kbd>o</dv-kbd>
  <dv-kbd>p</dv-kbd>
</div>
<div class="flex justify-center gap-1 my-1 w-full">
  <dv-kbd>a</dv-kbd>
  <dv-kbd>s</dv-kbd>
  <dv-kbd>d</dv-kbd>
  <dv-kbd>f</dv-kbd>
  <dv-kbd>g</dv-kbd>
  <dv-kbd>h</dv-kbd>
  <dv-kbd>j</dv-kbd>
  <dv-kbd>k</dv-kbd>
  <dv-kbd>l</dv-kbd>
</div>
<div class="flex justify-center gap-1 my-1 w-full">
  <dv-kbd>z</dv-kbd>
  <dv-kbd>x</dv-kbd>
  <dv-kbd>c</dv-kbd>
  <dv-kbd>v</dv-kbd>
  <dv-kbd>b</dv-kbd>
  <dv-kbd>n</dv-kbd>
  <dv-kbd>m</dv-kbd>
  <dv-kbd>/</dv-kbd>
</div>
vue

Kbd

Attributes

namedescriptiontypedefault
sizesizeISizemd