AI CSS Animations

Ellipsis Loader

The written ellipsis as a loader: dots pop in one at a time with a small overshoot, sit as a full '...', then float up and fade in the same order before the count starts again.

Also known as: dot dot dot loading animation, animated ellipsis, three dots appearing one by one.

HTML

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

CSS

.ldr-ellipsis-dots {
  --s: var(--ldr-size, 48px);
  --c: var(--ldr-color, #3b82f6);
  display: flex;
  align-items: center;
  gap: calc(var(--s) / 7);
  height: calc(var(--s) / 1.5);
}
.ldr-ellipsis-dots span {
  width: calc(var(--s) / 4.5);
  height: calc(var(--s) / 4.5);
  border-radius: 50%;
  background: var(--c);
  opacity: 0;
  animation: ldr-ellipsis-dots-count 2.2s infinite;
  animation-delay: calc(var(--i) * 0.25s - 2.2s);
}
@keyframes ldr-ellipsis-dots-count {
  0%       { transform: translateY(0) scale(0); opacity: 0; animation-timing-function: cubic-bezier(0.2, 0.9, 0.3, 1.6); }
  9%, 55%  { transform: translateY(0) scale(1); opacity: 1; animation-timing-function: cubic-bezier(0.5, 0, 0.7, 0.4); }
  66%      { transform: translateY(calc(var(--s) / -4)) scale(0.5); opacity: 0; }
  100%     { transform: translateY(0) scale(0); opacity: 0; }
}

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