Kbd
Used to display textual user input from keyboard.
Examples
Default
<div class="flex items-center gap-1">
<c-kbd>⌘</c-kbd>
<c-kbd>⇧</c-kbd>
<c-kbd>⌥</c-kbd>
<c-kbd>⌃</c-kbd>
</div>
Group
Use the c-kbd-group component to wrap multiple c-kbd elements in a single styled container.
Use
<p class="text-sm text-muted-foreground">
Use <c-kbd-group><c-kbd>Ctrl</c-kbd> + <c-kbd>B</c-kbd></c-kbd-group>
<c-kbd-group><c-kbd>Ctrl</c-kbd> + <c-kbd>K</c-kbd></c-kbd-group> to open the
command palette
</p>
Button
Use the c-kbd-group component inside a c-button to display a keyboard shortcut inside a button.
<c-button variant="outline">
<span>Search</span>
<c-kbd-group><c-kbd>⌘</c-kbd><c-kbd>K</c-kbd></c-kbd-group>
</c-button>
Single Key
<c-kbd>B</c-kbd>
API Reference
Kbd
Displays a single keyboard key.
KbdGroup
Wraps multiple keys in a single styled container.