Spinners

Canonical reference for VD3 UI loading spinners: border spinner, dot bounce, growing pulse, sizes and color modifiers, plus the signature quad-grid loader (.vd-dynamic-loader*). Styles ship in @vanduo-oss/vd3/css — copy HTML only; no extra layout CSS is required. For loading UX patterns (progress handoff, placeholders), see Preloader.

Border Spinner

Sizes

LoadingLoadingLoadingLoadingLoading

Colors

LoadingLoadingLoadingLoadingLoading

Inside buttons

Dots & Growing Spinner

Dot bounce

Growing pulse

Centering helper

Loading
Quad Loader (Signature VD3 UI Loader)

The grid applies staggered rotation via .vd-dynamic-loader-grid (nth-child delays in CSS). Optional inline animation-delay overrides are only needed if you want custom rhythm.

Loading your workspace...

Overlay on a skeleton card

Please wait...
CSS Variables
VariableDefaultDescription
--vd-spinner-size2remDefault spinner diameter
--vd-spinner-border-width3pxBorder spinner track thickness
--vd-spinner-colorvar(--vd-color-primary)Active/accent color
--vd-spinner-speed0.65sRotation duration
API Reference

Usage

<script setup lang="ts">
import { VdSpinner } from "@vanduo-oss/vd3";
</script>

<template>
  <VdSpinner />
  <VdSpinner size="xs" />
  <VdSpinner size="sm" />
  <VdSpinner size="lg" label="Loading…" />
  <VdSpinner size="xl" variant="success" />
  <VdSpinner variant="warning" />
  <VdSpinner variant="danger" />
  <VdSpinner variant="info" />
</template>

CSS Classes

ClassDescription
.vd-spinnerBorder spinner — a rotating circular border. Default size 2rem.
.vd-spinner-xs1rem diameter, 2px border.
.vd-spinner-sm1.5rem diameter, 2px border.
.vd-spinner-lg3rem diameter, 4px border.
.vd-spinner-xl4rem diameter, 5px border.
.vd-spinner-successGreen accent color.
.vd-spinner-warningAmber accent color.
.vd-spinner-errorRed accent color.
.vd-spinner-infoCyan accent color.
.vd-spinner-lightWhite accent (for dark backgrounds).
.vd-spinner-darkDark text color accent.
.vd-spinner-dotsThree bouncing dots loader.
.vd-spinner-growPulsing circle that grows and fades in a loop.
.vd-spinner-centerFlex container that centers a spinner with padding.
.vd-dynamic-loaderSignature 2x2 quad spinner grid with label.
.vd-dynamic-loader-gridThe 2x2 CSS grid of spinners.
.vd-dynamic-loader-textMuted label below the quad grid.
.vd-dynamic-loader-cardRelative container that hosts a full-cover .vd-dynamic-loader overlay.

Component API (Vue 3)

PropDescription
:sizexs | sm | md | lg | xl (default md).
:variantprimary | secondary | success | warning | danger | info (default primary).
:labelAccessible label (visually-hidden text for screen readers).
Accessibility
  • Always include an aria-label or visually-hidden text describing the loading state: <div class="vd-spinner" aria-label="Loading..."></div>.
  • When used inside buttons, the button itself should have aria-disabled="true" or disabled to prevent repeated submissions.
  • For page-level loading (quad loader), wrap it in an element with role="status" and aria-live="polite" so screen readers announce the loading state.
  • Spinners are decorative for sighted users but meaningful for screen reader users — never omit the accessible name.
  • Animations slow down to 1.5s when prefers-reduced-motion: reduce is active to minimize vestibular discomfort.