Kbd
Used to display textual user input from keyboard.
⌘⇧⌥⌃Ctrl+B
Installation
pnpm dlx shadcn-vue@latest add kbd
Usage
vue
<script setup lang="ts">
import { Kbd } from '@/components/ui/kbd'
</script>
<template>
<Kbd>Ctrl</Kbd>
</template>
Examples
Group
Use the KbdGroup
component to group keyboard keys together.
⌘⇧⌥⌃Ctrl+B
Button
Use the Kbd
component inside a Button
component to display a keyboard key inside a button.
Tooltip
You can use the Kbd
component inside a Tooltip
component to display a tooltip with a keyboard key.