The text is uncovered from left to right, as if a curtain were drawn back. A clip-path inset animation, so the text never moves; only what you can see of it changes.
Also known as: clip path text reveal, text wipe in, curtain text.
<div class="txt-clip-reveal">Unveiled</div>
.txt-clip-reveal {
--c: var(--txt-color, #3b82f6);
font-size: var(--txt-size, 32px);
font-family: system-ui, sans-serif;
font-weight: 700;
line-height: 1.2;
display: inline-block;
color: var(--c);
clip-path: inset(0 100% 0 0);
animation: txt-clip-reveal-wipe 0.9s cubic-bezier(0.7, 0, 0.3, 1) forwards;}
@keyframes txt-clip-reveal-wipe {
to { clip-path: inset(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) {
.txt-clip-reveal, .txt-clip-reveal *, .txt-clip-reveal::before, .txt-clip-reveal::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.