Spin Loader

Reference: Elevate Lookbook | Component: spin_loader/component.rb

Size Variants (Primary)

4 sizes: xs (16px), sm (20px), md (24px), lg (28px)

XS (16px)

SM (20px)

MD (24px)

LG (28px)

<div class="elv-spin-loader elv-spin-loader--md elv-spin-loader--primary">
  <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
    <path d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22" stroke-width="2.5" stroke-linecap="round"/>
  </svg>
</div>

Color Variants

3 color treatments: primary (purple), neutral (gray), inverted (white)

Primary (Purple)
Neutral (Gray)
Inverted (White) — for dark backgrounds
<!-- Primary (purple) -->
<div class="elv-spin-loader elv-spin-loader--md elv-spin-loader--primary">
  <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
    <path d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22" stroke-width="2.5" stroke-linecap="round"/>
  </svg>
</div>

<!-- Neutral (gray) -->
<div class="elv-spin-loader elv-spin-loader--md elv-spin-loader--neutral">
  <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
    <path d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22" stroke-width="2.5" stroke-linecap="round"/>
  </svg>
</div>

<!-- Inverted (white for dark backgrounds) -->
<div class="elv-spin-loader elv-spin-loader--md elv-spin-loader--inverted">
  <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
    <path d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22" stroke-width="2.5" stroke-linecap="round"/>
  </svg>
</div>

In Context

Common usage patterns for loading states

Loading your data...

Loading content

This may take a few moments...

Usage Guidelines

Accessibility Notes

<div role="status" aria-live="polite">
  <div class="elv-spin-loader elv-spin-loader--md elv-spin-loader--primary">
    <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
      <path d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22" stroke-width="2.5" stroke-linecap="round"/>
    </svg>
  </div>
  <span class="elv-sr-only">Loading content</span>
</div>

Reduced Motion Support

For users who prefer reduced motion, pause the animation

@media (prefers-reduced-motion: reduce) {
  .elv-spin-loader {
    animation: none;
    /* Show static version or pulse instead */
  }
}

Design System Specs

Sizes XS (16px), SM (20px), MD (24px), LG (28px)
Animation Spin (1s linear infinite)
Implementation SVG arc path with rotating container
Primary Color Stroke: #5746b2 (P100)
Neutral Color Stroke: #6f6d78 (N70)
Inverted Color Stroke: #ffffff