Text that switches on and off, hard, with no fade. Use it sparingly and only for things that genuinely need attention, like a live indicator or a recording light.
Also known as: flashing text, blink css, attention text.
<div class="txt-blink">● LIVE</div>
.txt-blink {
--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);
letter-spacing: 0.08em;
animation: txt-blink-flash 1.2s steps(2, start) infinite;}
@keyframes txt-blink-flash {
to { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
.txt-blink, .txt-blink *, .txt-blink::before, .txt-blink::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.