AI CSS Animations

Wave Text Loader

The letters of 'Loading' hop one after another in a wave. One span per letter, one keyframe, staggered delays. Swap the letters for your own word.

Also known as: bouncing letters, loading text wave.

Loading

HTML

<div class="ldr-wave-text" role="status" aria-label="Loading">
  <span>L</span><span>o</span><span>a</span><span>d</span><span>i</span><span>n</span><span>g</span>
</div>

CSS

.ldr-wave-text {
  --s: var(--ldr-size, 48px);
  --c: var(--ldr-color, #3b82f6);
  display: inline-flex;
  font: 700 calc(var(--s) / 2.2) system-ui, sans-serif;
  letter-spacing: 0.04em;
  color: var(--c);
}
.ldr-wave-text span {
  display: inline-block;
  animation: ldr-wave-text-hop 1.4s ease-in-out infinite;
}
.ldr-wave-text span:nth-child(2) { animation-delay: 0.08s; }
.ldr-wave-text span:nth-child(3) { animation-delay: 0.16s; }
.ldr-wave-text span:nth-child(4) { animation-delay: 0.24s; }
.ldr-wave-text span:nth-child(5) { animation-delay: 0.32s; }
.ldr-wave-text span:nth-child(6) { animation-delay: 0.4s; }
.ldr-wave-text span:nth-child(7) { animation-delay: 0.48s; }
@keyframes ldr-wave-text-hop {
  0%, 40%, 100% { transform: translateY(0); }
  20%           { transform: translateY(-0.4em); }
}

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