AI CSS Animations

Dropping Letters Loading Text

The letters of Loading fall into place one by one, squash on landing, hold, then drop away through the baseline. Negative delays keep the stagger clean from the first frame.

Also known as: falling letters animation, letters drop in loading, loading text drop.

HTML

<div class="ldr-dropping-letters" role="status" aria-label="Loading">
  <span aria-hidden="true">L</span><span aria-hidden="true">o</span><span aria-hidden="true">a</span><span aria-hidden="true">d</span><span aria-hidden="true">i</span><span aria-hidden="true">n</span><span aria-hidden="true">g</span>
</div>

CSS

.ldr-dropping-letters {
  --s: var(--ldr-size, 48px);
  --c: var(--ldr-color, #3b82f6);
  display: inline-flex;
  font: 800 calc(var(--s) / 2.1) / 1 system-ui, sans-serif;
  letter-spacing: 0.02em;
  color: var(--c);
}
.ldr-dropping-letters span {
  display: inline-block;
  transform-origin: 50% 100%;
  animation: ldr-dropping-letters-drop 3s infinite;
  animation-delay: calc(var(--i, 0) * 0.07s - 3s);
}
.ldr-dropping-letters span:nth-child(2) { --i: 1; }
.ldr-dropping-letters span:nth-child(3) { --i: 2; }
.ldr-dropping-letters span:nth-child(4) { --i: 3; }
.ldr-dropping-letters span:nth-child(5) { --i: 4; }
.ldr-dropping-letters span:nth-child(6) { --i: 5; }
.ldr-dropping-letters span:nth-child(7) { --i: 6; }
@keyframes ldr-dropping-letters-drop {
  0% {
    transform: translateY(-0.9em);
    opacity: 0;
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  }
  11% {
    transform: translateY(0) scale(1.12, 0.8);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  19%, 68% {
    transform: translateY(0) scale(1);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  }
  82%, 100% { transform: translateY(0.9em); opacity: 0; }
}

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