AI CSS Animations

Popping Dots Loader

Three dots slowly inflate like bubbles, overstretch, and pop into a thin ring that spreads and fades, one after another. The fill and the ring are the two pseudo-elements of each dot.

Also known as: bubble pop loader, inflating dots, dots bursting animation.

HTML

<div class="ldr-popping-dots" role="status" aria-label="Loading">
  <span style="--i:0"></span><span style="--i:1"></span><span style="--i:2"></span>
</div>

CSS

.ldr-popping-dots {
  --s: var(--ldr-size, 48px);
  --c: var(--ldr-color, #3b82f6);
  --d: calc(var(--s) / 3.2);
  display: flex;
  gap: calc(var(--s) / 5);
}
.ldr-popping-dots span {
  position: relative;
  width: var(--d);
  height: var(--d);
}
.ldr-popping-dots span::before,
.ldr-popping-dots span::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
.ldr-popping-dots span::before {
  background: var(--c);
  animation: ldr-popping-dots-fill 2.1s infinite;
  animation-delay: calc(var(--i) * 0.7s - 2.1s);
}
.ldr-popping-dots span::after {
  border: calc(var(--s) / 22) solid var(--c);
  opacity: 0;
  animation: ldr-popping-dots-ring 2.1s infinite;
  animation-delay: calc(var(--i) * 0.7s - 2.1s);
}
@keyframes ldr-popping-dots-fill {
  0%       { transform: scale(0); animation-timing-function: cubic-bezier(0.3, 1.4, 0.6, 1); }
  12%      { transform: scale(0.35); animation-timing-function: cubic-bezier(0.5, 0, 0.9, 0.6); }
  70%      { transform: scale(0.95); animation-timing-function: ease-out; }
  74%      { transform: scale(1.12, 1.02); animation-timing-function: ease-in; }
  76%, 100% { transform: scale(0); }
}
@keyframes ldr-popping-dots-ring {
  0%, 74%  { transform: scale(0.9); opacity: 0; }
  76%      { transform: scale(1); opacity: 1; animation-timing-function: cubic-bezier(0.2, 0.7, 0.4, 1); }
  94%, 100% { transform: scale(1.7); opacity: 0; }
}

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