v1.3.0 28

Spinner

A loading spinner to indicate an ongoing process.

Default

Basic spinning circle indicator.

html
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-spinner" aria-hidden="true" role="status" aria-label="Loading">
  <path d="M21.9961 12C21.9961 17.5228 17.5189 22 11.9961 22C6.47325 22 1.99609 17.5228 1.99609 12C1.99609 6.47715 6.47325 2 11.9961 2" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"></path>
</svg>

Sizes

Small (16px), medium (24px), large (32px), and extra-large (48px) spinners.

html
sm
md
lg
xl
<div class="vt-spinner-status vt-spinner-status-vertical">
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-spinner vt-spinner-sm" aria-hidden="true">
    <path d="M21.9961 12C21.9961 17.5228 17.5189 22 11.9961 22C6.47325 22 1.99609 17.5228 1.99609 12C1.99609 6.47715 6.47325 2 11.9961 2" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"></path>
  </svg>
  <span class="vt-spinner-label">sm</span>
</div>
<div class="vt-spinner-status vt-spinner-status-vertical">
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-spinner" aria-hidden="true">
    <path d="M21.9961 12C21.9961 17.5228 17.5189 22 11.9961 22C6.47325 22 1.99609 17.5228 1.99609 12C1.99609 6.47715 6.47325 2 11.9961 2" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"></path>
  </svg>
  <span class="vt-spinner-label">md</span>
</div>
<div class="vt-spinner-status vt-spinner-status-vertical">
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-spinner vt-spinner-lg" aria-hidden="true">
    <path d="M21.9961 12C21.9961 17.5228 17.5189 22 11.9961 22C6.47325 22 1.99609 17.5228 1.99609 12C1.99609 6.47715 6.47325 2 11.9961 2" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"></path>
  </svg>
  <span class="vt-spinner-label">lg</span>
</div>
<div class="vt-spinner-status vt-spinner-status-vertical">
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-spinner vt-spinner-xl" aria-hidden="true">
    <path d="M21.9961 12C21.9961 17.5228 17.5189 22 11.9961 22C6.47325 22 1.99609 17.5228 1.99609 12C1.99609 6.47715 6.47325 2 11.9961 2" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"></path>
  </svg>
  <span class="vt-spinner-label">xl</span>
</div>

With Label

html
Loading…
Please wait while we process your request…
Loading content…
<div class="vt-spinner-status" role="status">
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-spinner vt-spinner-sm" aria-hidden="true">
    <path d="M21.9961 12C21.9961 17.5228 17.5189 22 11.9961 22C6.47325 22 1.99609 17.5228 1.99609 12C1.99609 6.47715 6.47325 2 11.9961 2" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"></path>
  </svg>
  <span class="vt-spinner-label">Loading…</span>
</div>
<div class="vt-spinner-status" role="status">
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-spinner vt-spinner-sm" aria-hidden="true">
    <path d="M21.9961 12C21.9961 17.5228 17.5189 22 11.9961 22C6.47325 22 1.99609 17.5228 1.99609 12C1.99609 6.47715 6.47325 2 11.9961 2" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"></path>
  </svg>
  <span class="vt-spinner-label">Please wait while we process your request…</span>
</div>
<div class="vt-spinner-status vt-spinner-status-vertical vt-self-center" role="status">
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-spinner vt-spinner-lg" aria-hidden="true">
    <path d="M21.9961 12C21.9961 17.5228 17.5189 22 11.9961 22C6.47325 22 1.99609 17.5228 1.99609 12C1.99609 6.47715 6.47325 2 11.9961 2" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"></path>
  </svg>
  <span class="vt-spinner-label">Loading content…</span>
</div>

Button with Spinner

Buttons showing a loading state with an embedded spinner.

html
<button disabled="" aria-busy="true" class="vt-btn vt-btn-primary">
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-spinner vt-spinner-sm" aria-hidden="true">
    <path d="M21.9961 12C21.9961 17.5228 17.5189 22 11.9961 22C6.47325 22 1.99609 17.5228 1.99609 12C1.99609 6.47715 6.47325 2 11.9961 2" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"></path>
  </svg>
  <span>Loading…</span>
</button>
<button disabled="" aria-busy="true" class="vt-btn vt-btn-secondary">
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-spinner vt-spinner-sm" aria-hidden="true">
    <path d="M21.9961 12C21.9961 17.5228 17.5189 22 11.9961 22C6.47325 22 1.99609 17.5228 1.99609 12C1.99609 6.47715 6.47325 2 11.9961 2" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"></path>
  </svg>
  <span>Saving…</span>
</button>
<button disabled="" aria-busy="true" class="vt-btn vt-btn-bordered">
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-spinner vt-spinner-sm" aria-hidden="true">
    <path d="M21.9961 12C21.9961 17.5228 17.5189 22 11.9961 22C6.47325 22 1.99609 17.5228 1.99609 12C1.99609 6.47715 6.47325 2 11.9961 2" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"></path>
  </svg>
  <span>Uploading…</span>
</button>
<button disabled="" aria-busy="true" class="vt-btn vt-btn-danger">
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-spinner vt-spinner-sm" aria-hidden="true">
    <path d="M21.9961 12C21.9961 17.5228 17.5189 22 11.9961 22C6.47325 22 1.99609 17.5228 1.99609 12C1.99609 6.47715 6.47325 2 11.9961 2" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"></path>
  </svg>
  <span>Deleting…</span>
</button>

<button class="vt-btn vt-btn-primary">
  Submit
</button>

Full Page Overlay

A spinner overlay covering the full page. Click the button to preview.

html
<button class="vt-btn vt-btn-primary" onclick="document.getElementById('overlay-spinner').hidden = false">

  Show Overlay Spinner
</button>

<div id="overlay-spinner" class="vt-spinner-overlay" role="status" hidden="" onclick="this.hidden = true">
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-spinner vt-spinner-xl" aria-hidden="true">
    <path d="M21.9961 12C21.9961 17.5228 17.5189 22 11.9961 22C6.47325 22 1.99609 17.5228 1.99609 12C1.99609 6.47715 6.47325 2 11.9961 2" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"></path>
  </svg>
  <p class="vt-spinner-label">Loading, please wait… Click anywhere to dismiss.</p>
</div>

Guidelines

Loading…
Do Pair the spinner with a label so users know what's loading.
Don't Don't scatter multiple spinners; use one for the whole region.

Anatomy

div.vt-spinner-status            ← Optional: spinner with a label (role="status")
├── svg.vt-spinner               ← The arc (vt-spinner-sm | -lg | -xl)
└── span.vt-spinner-label        ← What is loading

API Reference

Class Type Description
vt-spinner Base The rotating arc (an svg, LoaderCircle) — 24px, brand color; takes the text color inside a vt-btn
vt-spinner-sm Size 16px — beside a label or inside a button
vt-spinner-md Size 24px (default)
vt-spinner-lg Size 32px — a region or a card
vt-spinner-xl Size 48px — a page or an overlay
vt-spinner-status Part A spinner and its label in a row, 8px apart; carries role="status"
vt-spinner-status-vertical Modifier Stacks the spinner above its label, 12px apart
vt-spinner-label Part What is loading — Body/SM, muted
vt-spinner-overlay Part Covers the page on a translucent card surface, the spinner and label centered; hidden with the hidden attribute

Accessibility

Feature Details
Role The spinner, or the vt-spinner-status around it, carries role="status" so the wait is announced
Label A spinner alone needs aria-label="Loading"; with a vt-spinner-label the svg is aria-hidden="true"
Busy A button that waits is disabled with aria-busy="true", and its text says what is happening (Saving…)
Motion Under prefers-reduced-motion the rotation slows to one turn in 3 seconds instead of stopping, so the wait stays visible