Trên trang này

Spinner

Cài đặt, prop và các phần tạo nên Spinner.

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/spinner.json

Cách dùng

<script setup lang="ts">
import { Spinner } from '@/components/ui/spinner'
</script>

<template>
  <div aria-busy="true" class="flex items-center gap-(--bh-space-100)">
    <Spinner aria-label="Đang tải đơn hàng" />
    <span aria-hidden="true">Đang tải đơn hàng…</span>
  </div>
</template>

Prop

Prop Giá trị Ghi chú
delay boolean true (mặc định): hiện sau motion.wait.spinner, đọc từ token. false: hiện ngay
aria-label chuỗi Mặc định “Loading”. Hãy dịch, và nói rõ thứ gì đang tải
class chuỗi Màu theo màu chữ; đặt class kích thước để đổi size.icon.default

Dựng từ

Icon Lucide loader-circle với role="status", theo API Spinner của control-center. Beehexa thêm icon theo D11, tốc độ theo token và thời gian chờ theo D18 (delay).