Skip to content

Gradient Spinner

A copy-paste spinners component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

SpinnersHTMLCSSany framework

Copy into your project

HTML
<!-- Gradient Spinner -->
<div class="nuda-gradient-spinner" role="status" aria-label="Loading"></div>
CSS
/* Gradient Spinner
   Conic gradient arc spinning. Uses mask to create ring shape.
   Customize: --grad-spinner-color, --grad-spinner-size */

.nuda-gradient-spinner {
  --grad-spinner-color: #a78bfa;
  --grad-spinner-size: 40px;
  width: var(--grad-spinner-size);
  height: var(--grad-spinner-size);
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    var(--grad-spinner-color) 70%,
    transparent 100%
  );
  -webkit-mask: radial-gradient(
    farthest-side,
    transparent calc(100% - 4px),
    #000 calc(100% - 3px)
  );
  mask: radial-gradient(
    farthest-side,
    transparent calc(100% - 4px),
    #000 calc(100% - 3px)
  );
  animation: nuda-gradient-spin 1s linear infinite;
  will-change: transform;
}

@keyframes nuda-gradient-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .nuda-gradient-spinner {
    animation: none;
    opacity: 0.6;
  }
}

How to use Gradient Spinner

Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.

Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.

More spinners components

← Browse all NudaUI components