AI CSS Animations

Voice Assistant Loader

A filled circle with five white bars moving like a live voice waveform, while a faint ripple rolls outward. Fits voice input, dictation and any 'listening' state.

Also known as: voice waveform animation, ai listening animation, audio wave orb.

HTML

<div class="ldr-voice-assistant-orb" role="status" aria-label="Listening">
  <span></span><span></span><span></span><span></span><span></span>
</div>

CSS

.ldr-voice-assistant-orb {
  --s: var(--ldr-size, 48px);
  --c: var(--ldr-color, #3b82f6);
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--s) / 16);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: var(--c);
}
.ldr-voice-assistant-orb::before,
.ldr-voice-assistant-orb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  background: var(--c);
  animation: ldr-voice-assistant-orb-ripple 2s cubic-bezier(0.2, 0.6, 0.35, 1) infinite;
}
.ldr-voice-assistant-orb::after { animation-delay: -1s; }
.ldr-voice-assistant-orb span {
  width: calc(var(--s) / 14);
  height: calc(var(--s) / 2);
  border-radius: calc(var(--s) / 14);
  background: #fff;
  transform: scaleY(0.3);
  animation: ldr-voice-assistant-orb-talk 0.9s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
.ldr-voice-assistant-orb span:nth-child(1) { --h: 0.5; animation-delay: -0.2s; }
.ldr-voice-assistant-orb span:nth-child(2) { --h: 0.85; animation-delay: -0.55s; }
.ldr-voice-assistant-orb span:nth-child(3) { --h: 1; animation-delay: 0s; }
.ldr-voice-assistant-orb span:nth-child(4) { --h: 0.75; animation-delay: -0.35s; }
.ldr-voice-assistant-orb span:nth-child(5) { --h: 0.45; animation-delay: -0.7s; }
@keyframes ldr-voice-assistant-orb-talk {
  0%, 100% { transform: scaleY(0.3); }
  50%      { transform: scaleY(var(--h)); }
}
@keyframes ldr-voice-assistant-orb-ripple {
  0%   { transform: scale(1); opacity: 0.35; }
  100% { transform: scale(1.6); opacity: 0; }
}

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