Skip to content

Infinity Loop

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

LoadersHTMLCSSany framework

Copy into your project

HTML
<!-- Infinity Loop Loader -->
<div class="nuda-infinity-loop" role="status" aria-label="Loading">
  <svg viewBox="0 0 100 50" width="64" height="32">
    <path
      class="nuda-infinity-loop__path"
      d="M25,25 C25,10 0,10 0,25 C0,40 25,40 25,25 C25,10 50,10 50,25 C50,40 25,40 25,25"
      fill="none"
      stroke-width="3"
      transform="translate(25, 0)"
    />
  </svg>
</div>
CSS
/* Infinity Loop Loader
   A figure-8 / infinity path animation using SVG stroke-dashoffset.
   Customize: --infinity-color, --infinity-stroke */

.nuda-infinity-loop {
  --infinity-color: #a78bfa;
  --infinity-stroke: 3;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nuda-infinity-loop__path {
  stroke: var(--infinity-color);
  stroke-dasharray: 120;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  stroke-width: var(--infinity-stroke);
  animation: nuda-infinity-loop 2s linear infinite;
}

@keyframes nuda-infinity-loop {
  0%   { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -240; }
}

@media (prefers-reduced-motion: reduce) {
  .nuda-infinity-loop__path {
    animation: none;
    stroke-dashoffset: 0;
    opacity: 0.6;
  }
}

How to use Infinity Loop

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 loaders components

← Browse all NudaUI components