Letters start spread far apart and slide together as they fade in. Animating letter-spacing gives it a cinematic title-card feel.
Also known as: letter spacing animation, expand letters, kinetic typography.
<div class="txt-tracking-in">PREMIERE</div>
.txt-tracking-in {
--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);
opacity: 0;
letter-spacing: 0.5em;
animation: txt-tracking-in-contract 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;}
@keyframes txt-tracking-in-contract {
from { opacity: 0; letter-spacing: 0.5em; }
to { opacity: 1; letter-spacing: 0.08em; }
}
@media (prefers-reduced-motion: reduce) {
.txt-tracking-in, .txt-tracking-in *, .txt-tracking-in::before, .txt-tracking-in::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.