AI CSS Animations

Voice Mode Speaking Dots

Four round dots rest and breathe while the assistant waits, then stretch into pills of different heights as it speaks and fold back. Each dot reads its own heights inside one shared keyframe.

Also known as: chatgpt voice dots, voice mode animation, speaking dots animation css, ai speaking indicator.

HTML

<div class="aia-voice-mode-dots" role="status" aria-label="Assistant is speaking">
  <i style="--h1: 2.4; --h2: 3.6; --h3: 1.8; --h4: 3; --h5: 2.2; --h6: 3.4"></i>
  <i style="--h1: 3.6; --h2: 2; --h3: 4.4; --h4: 2.4; --h5: 3.8; --h6: 2"></i>
  <i style="--h1: 3; --h2: 4.2; --h3: 2.4; --h4: 4; --h5: 2.6; --h6: 3.6"></i>
  <i style="--h1: 2; --h2: 2.8; --h3: 3.4; --h4: 1.8; --h5: 3; --h6: 2.4"></i>
</div>

CSS

.aia-voice-mode-dots {
  --c: var(--aia-color, #7c5cff);
  font-size: var(--aia-size, 16px);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 0.75em;
  height: 7em;
}
.aia-voice-mode-dots i {
  width: 1.6em;
  height: 1.6em;
  border-radius: 1em;
  background: var(--c);
  box-shadow: 0 0.4em 1em -0.3em color-mix(in srgb, var(--c) 60%, transparent);
  animation: aia-voice-mode-dots-talk 5s cubic-bezier(0.5, 0, 0.3, 1) infinite;
}
.aia-voice-mode-dots i:nth-child(2) { animation-delay: -0.06s; }
.aia-voice-mode-dots i:nth-child(3) { animation-delay: -0.12s; }
.aia-voice-mode-dots i:nth-child(4) { animation-delay: -0.18s; }
@keyframes aia-voice-mode-dots-talk {
  0%, 100% { height: 1.6em; scale: 1; }
  9%  { scale: 1.08; }
  18% { height: 1.6em; scale: 1; }
  28% { height: calc(var(--h1) * 1em); }
  38% { height: calc(var(--h2) * 1em); }
  48% { height: calc(var(--h3) * 1em); }
  58% { height: calc(var(--h4) * 1em); }
  68% { height: calc(var(--h5) * 1em); }
  78% { height: calc(var(--h6) * 1em); }
  90% { height: 1.6em; }
}
@media (prefers-reduced-motion: reduce) {
  .aia-voice-mode-dots i { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .aia-voice-mode-dots, .aia-voice-mode-dots *, .aia-voice-mode-dots::before, .aia-voice-mode-dots::after, .aia-voice-mode-dots *::before, .aia-voice-mode-dots *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

Customizing this snippet

  • Color: set --aia-color on the element or a parent. Currently previewing #3b82f6.
  • Base size: set --aia-size. Every other dimension is in em, so the whole thing scales together. Currently previewing 16px.
  • Speed: change the duration on the transition or animation shorthand. Staggered delays are relative, so they keep their rhythm.
  • Reduced motion: the rule at the end of the CSS turns the motion off for people who asked their OS for less of it. Keep it.

Similar ai animations