Cài đặt
Chạy lệnh này trong app, sau shadcn-vue init và theme Beehexa (Button › Code):
npx shadcn-vue@latest add https://beehexa.design/r/kbd.json
Cách dùng
<script setup lang="ts">
import { Kbd, KbdGroup } from '@/components/ui/kbd'
</script>
<template>
<KbdGroup>
<Kbd>Ctrl</Kbd><span aria-hidden="true">+</span><Kbd>K</Kbd>
</KbdGroup>
</template>
Prop
| Phần | Prop | Giá trị | Ghi chú |
|---|---|---|---|
Kbd, KbdGroup |
class |
chuỗi | Gộp với class của Beehexa |
Dựng từ
Thẻ <kbd> gốc, như Kbd của shadcn-vue. Beehexa thêm style và một đường viền, để phím trông như phím trên cả nền sáng lẫn nền tối.