The letters ride a wave, each one rising a beat after its neighbor. The delay comes from the per-letter index, so any word works without touching the CSS.
Also known as: wavy text, bouncing letters, letter wave animation.
<div class="txt-wave" aria-label="Wavy text"><span style="--i: 0">W</span><span style="--i: 1">a</span><span style="--i: 2">v</span><span style="--i: 3">y</span><span style="--i: 4"> </span><span style="--i: 5">t</span><span style="--i: 6">e</span><span style="--i: 7">x</span><span style="--i: 8">t</span></div>
.txt-wave {
--c: var(--txt-color, #3b82f6);
font-size: var(--txt-size, 32px);
font-family: system-ui, sans-serif;
font-weight: 700;
line-height: 1.2;
color: var(--c);}
.txt-wave span {
display: inline-block;
animation: txt-wave-rise 1.6s ease-in-out infinite;
animation-delay: calc(var(--i) * 80ms);
}
@keyframes txt-wave-rise {
0%, 40%, 100% { transform: translateY(0); }
20% { transform: translateY(-0.35em); }
}
@media (prefers-reduced-motion: reduce) {
.txt-wave, .txt-wave *, .txt-wave::before, .txt-wave::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}--txt-color on the element or a parent.
Currently previewing #3b82f6.--txt-size. Every other dimension is in
em, so the whole thing scales together. Currently previewing 40px.transition or animation
shorthand. Staggered delays are relative, so they keep their rhythm.