AI CSS Animations

Neon Glow Spinner

A half ring with a soft outer glow and an inner bloom, like a neon tube. Best on a dark background, where the glow has somewhere to go.

Also known as: glowing spinner, neon loader.

HTML

<div class="ldr-neon-ring" role="status" aria-label="Loading"></div>

CSS

.ldr-neon-ring {
  --s: var(--ldr-size, 48px);
  --c: var(--ldr-color, #3b82f6);
  width: var(--s);
  height: var(--s);
  border: calc(var(--s) / 12) solid transparent;
  border-top-color: var(--c);
  border-right-color: var(--c);
  border-radius: 50%;
  box-shadow: 0 0 calc(var(--s) / 4) color-mix(in srgb, var(--ldr-color, #3b82f6) 55%, transparent), inset 0 0 calc(var(--s) / 4) color-mix(in srgb, var(--ldr-color, #3b82f6) 30%, transparent);
  filter: drop-shadow(0 0 calc(var(--s) / 10) var(--c));
  animation: ldr-neon-ring-spin 1s linear infinite;
}
@keyframes ldr-neon-ring-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .ldr-neon-ring, .ldr-neon-ring *, .ldr-neon-ring::before, .ldr-neon-ring::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