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/skeleton.json
Cách dùng
Đặt kích thước từng khối bằng class; skeleton chỉ lo màu nền, bo góc và nhấp nháy.
<script setup lang="ts">
import { Skeleton } from '@/components/ui/skeleton'
</script>
<template>
<div aria-busy="true" class="flex flex-col gap-(--bh-space-100)">
<span class="sr-only">Đang tải đơn hàng</span>
<Skeleton class="h-(--bh-space-200) w-3/4" />
<Skeleton class="h-(--bh-space-200) w-1/2" />
</div>
</template>
Prop
| Prop | Giá trị | Ghi chú |
|---|---|---|
class |
chuỗi | Chiều rộng, chiều cao và, với avatar, rounded-(--bh-radius-full) |
Dựng từ
Một div thường theo API Skeleton của shadcn-vue. Beehexa thêm token, aria-hidden="true" và skeleton đứng yên khi giảm chuyển động.