AI CSS Animations

Mirrored Arcs Spinner

Two arcs open from a single dot, sweep down either side of the ring and pinch back into a dot on the far side while the whole thing turns. One arc is the other mirrored with scaleX(-1).

Also known as: symmetric arc spinner, butterfly spinner, two sided arc loader.

HTML

<svg class="ldr-mirrored-arcs" viewBox="0 0 48 48" role="status" aria-label="Loading">
  <circle cx="24" cy="24" r="19" pathLength="100"></circle>
  <circle cx="24" cy="24" r="19" pathLength="100"></circle>
</svg>

CSS

.ldr-mirrored-arcs {
  --s: var(--ldr-size, 48px);
  --c: var(--ldr-color, #3b82f6);
  width: var(--s);
  height: var(--s);
  animation: ldr-mirrored-arcs-turn 1.4s linear infinite;
}
.ldr-mirrored-arcs circle {
  fill: none;
  stroke: var(--c);
  stroke-width: 4.5;
  stroke-linecap: round;
  transform-origin: center;
  transform: rotate(-90deg);
  animation: ldr-mirrored-arcs-sweep 1.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.ldr-mirrored-arcs circle + circle {
  transform: scaleX(-1) rotate(-90deg);
}
/* Each arc runs from the top (0) to the bottom (50); a half turn per loop hands over seamlessly. */
@keyframes ldr-mirrored-arcs-turn {
  to { transform: rotate(180deg); }
}
@keyframes ldr-mirrored-arcs-sweep {
  0%   { stroke-dasharray: 0 100;  stroke-dashoffset: 0; }
  50%  { stroke-dasharray: 42 58;  stroke-dashoffset: -6; }
  100% { stroke-dasharray: 0 100;  stroke-dashoffset: -50; }
}

@media (prefers-reduced-motion: reduce) {
  .ldr-mirrored-arcs, .ldr-mirrored-arcs *, .ldr-mirrored-arcs::before, .ldr-mirrored-arcs::after, .ldr-mirrored-arcs *::before, .ldr-mirrored-arcs *::after {
    animation-duration: 3s;
  }
}

Customizing this loader

  • Color: set --ldr-color on the element or a parent. Currently previewing #3b82f6.
  • Size: set --ldr-size. Every dimension in the snippet is derived from it. Currently previewing 64px.
  • Speed: change the duration on the animation shorthand. Delays on the children are relative, so they keep their rhythm.
  • Accessibility: the root carries 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.

Similar loaders