Cài đặt
Chạy trong app, sau shadcn-vue init và theme Beehexa (Nút › Code):
npx shadcn-vue@latest add https://beehexa.design/r/button.json
npx shadcn-vue@latest add https://beehexa.design/r/button-group.json
Cách dùng
<script setup lang="ts">
import { Button } from '@/components/ui/button'
import { ButtonGroup } from '@/components/ui/button-group'
</script>
<template>
<ButtonGroup variant="spaced" aria-label="Thao tác của hộp thoại" class="justify-end">
<Button variant="outline">Hủy</Button>
<Button>Lưu kết nối</Button>
</ButtonGroup>
</template>
Props
| Prop | Giá trị | Ghi chú |
|---|---|---|
variant |
joined (mặc định), spaced |
Joined giống ButtonGroup của shadcn-vue |
aria-label |
chuỗi | Đặt tên cho cả nhóm, như “Khoảng ngày” |
Dựng từ
Một div có role="group"; các nút bên trong là Button của Beehexa.