AI CSS Animations

Sound Wave Loader

Nine rounded bars shaped like a voice waveform, pulsing outward from the tallest bar in the middle. Suits voice input, calls and audio processing. The stagger comes from one --d distance variable.

Also known as: audio wave animation, voice wave bars, mirrored bars loader.

HTML

<div class="ldr-sound-wave" role="status" aria-label="Loading">
  <span style="--h: 0.3; --d: 4"></span>
  <span style="--h: 0.5; --d: 3"></span>
  <span style="--h: 0.7; --d: 2"></span>
  <span style="--h: 0.86; --d: 1"></span>
  <span style="--h: 1; --d: 0"></span>
  <span style="--h: 0.86; --d: 1"></span>
  <span style="--h: 0.7; --d: 2"></span>
  <span style="--h: 0.5; --d: 3"></span>
  <span style="--h: 0.3; --d: 4"></span>
</div>

CSS

.ldr-sound-wave {
  --s: var(--ldr-size, 48px);
  --c: var(--ldr-color, #3b82f6);
  display: flex;
  align-items: center;
  gap: calc(var(--s) / 14);
  height: var(--s);
}
.ldr-sound-wave span {
  width: calc(var(--s) / 14);
  height: calc(var(--s) * var(--h));
  border-radius: var(--s);
  background: var(--c);
  animation: ldr-sound-wave-pulse 1.1s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  animation-delay: calc(var(--d) * 0.13s - 1.1s);
}
@keyframes ldr-sound-wave-pulse {
  0%, 100% { transform: scaleY(0.3); opacity: 0.55; }
  50%      { transform: scaleY(1); opacity: 1; }
}

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