A long arc and a short one share the same ring at different speeds, so the short one keeps catching up, merging and pulling away again. Two SVG circles, no delays to tune.
Also known as: double arc spinner, two arcs loader, overtaking arcs animation.
<svg class="ldr-chasing-arcs" viewBox="0 0 48 48" role="status" aria-label="Loading"> <circle class="ldr-chasing-arcs-long" cx="24" cy="24" r="19" pathLength="100"></circle> <circle class="ldr-chasing-arcs-short" cx="24" cy="24" r="19" pathLength="100"></circle> </svg>
.ldr-chasing-arcs {
--s: var(--ldr-size, 48px);
--c: var(--ldr-color, #3b82f6);
width: var(--s);
height: var(--s);
}
.ldr-chasing-arcs circle {
fill: none;
stroke-width: 4.5;
stroke-linecap: round;
transform-origin: center;
}
.ldr-chasing-arcs-long {
stroke: color-mix(in srgb, var(--ldr-color, #3b82f6) 45%, transparent);
stroke-dasharray: 32 68;
animation: ldr-chasing-arcs-spin 1.8s linear infinite;
}
/* Two laps for every one of the long arc, eased so it surges past and drifts off. */
.ldr-chasing-arcs-short {
stroke: var(--c);
stroke-dasharray: 12 88;
animation: ldr-chasing-arcs-spin 0.9s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}
@keyframes ldr-chasing-arcs-spin {
to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
.ldr-chasing-arcs, .ldr-chasing-arcs *, .ldr-chasing-arcs::before, .ldr-chasing-arcs::after, .ldr-chasing-arcs *::before, .ldr-chasing-arcs *::after {
animation-duration: 3s;
}
}--ldr-color on the element or a parent.
Currently previewing #3b82f6.--ldr-size. Every dimension in the snippet is
derived from it. Currently previewing 64px.animation shorthand.
Delays on the children are relative, so they keep their rhythm.role="status" and an
aria-label so screen readers announce the wait. The reduced-motion rule
at the end slows the animation for users who asked for less motion.