23 Pure CSS5 with JSPublished 2026-10-05Free · no sign-up
Text animations for headlines and hero sections, plus three families that used to have their own pages: typewriter effects with a blinking caret, glitch text and neon glow. The core set: text animations for headlines and hero sections: words that rise from behind a mask, letters moving in a wave, a rotating word, a highlighter sweeping across key phrases, a blur-in entrance, a decoding scramble and outlined letters that fill like rising liquid.
Each word slides up from below an invisible line, one after another, a staple of editorial landing pages. Every word sits in an overflow: hidden wrapper, and the heading's full text stays in the DOM in reading order so screen readers hear one sentence.
Each letter bobs up and down with a delay based on its position, producing a wave along the word. The letters are split into spans by script, the sentence is repeated once in visually hidden text, and the letter spans are hidden from assistive technology.
View code
<p class="ta2"><span class="sr">Loading your space</span><span class="l" aria-hidden="true">Loading your space</span></p>
var l = document.querySelector('.ta2 .l'), t = l.textContent;
l.textContent = '';
t.split('').forEach(function (c, i) { var s = document.createElement('span'); s.textContent = c; s.style.setProperty('--i', i); l.appendChild(s); });
03. Rotating Word in a Headline
TextRotator
The last word of the headline cycles through designers, developers and founders with a vertical slide. Screen readers get a static version, Built for designers, developers and founders, in a hidden span, because a changing word would be confusing to hear.
View code
<h3 class="ta3"><span class="sr">Built for designers, developers and founders</span><span aria-hidden="true">Built for <span class="box"><span class="list"><b>designers</b><b>developers</b><b>founders</b><b>designers</b></span></span></span></h3>
Key words in a sentence get a yellow highlighter stroke that sweeps across them on load, drawn with a background gradient whose size animates from 0 to 100 percent. The words are mark elements, so the emphasis is also semantic.
View code
<p class="ta4">Ship your store in <mark>one weekend</mark>, not <mark>three months</mark>.</p>
The headline starts blurred and slightly spaced out, then sharpens and tightens into place, a soft entrance suited to calm brands. filter: blur and letter-spacing animate once together, and the text is fully readable from the end of the first second.
Random characters resolve into the real text from left to right, like a terminal decoding a message. The final text is in the HTML from the start and the effect only runs on screen; the scrambling copy is aria-hidden and the real words sit in visually hidden text, so nothing garbled is read.
var el = document.querySelector('.ta6 .v'), final = el.textContent, chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789#$%&';
if (!matchMedia('(prefers-reduced-motion: reduce)').matches) { var f = 0;
var id = setInterval(function () { el.textContent = final.split('').map(function (c, i) { return c === ' ' || i < f / 3 ? c : chars[Math.floor(Math.random() * chars.length)]; }).join(''); if (++f > final.length * 3) { clearInterval(id); el.textContent = final; } }, 40); }
07. Outline Text That Fills
TextStroke
Big outlined letters fill with solid colour from bottom to top, like liquid rising. The outline is -webkit-text-stroke, and the fill is a background clipped to the text whose position animates; browsers without text clipping show plain solid text.
The text reveals one character at a time because its width animates in steps() from 0 to the text's length in ch units, and a border on the right blinks as the caret. It needs a monospace font so every character is exactly 1ch wide.
The second line starts typing only after the first has finished, using an animation delay equal to the first line's duration. The caret moves with the typing because only the line currently being typed shows it.
View code
<div class="ty2"><p class="a">Hello, I'm Sam.</p><p class="b">I build fast shops.</p></div>
A headline types a word, pauses, deletes it and types the next, in a loop. Screen readers get one static sentence listing every word, and the moving part is aria-hidden, because a constantly changing word would be read over and over.
View code
<h3 class="ty3"><span class="sr">We design websites, online shops and mobile apps.</span><span aria-hidden="true">We design <span class="w"></span><span class="c">|</span></span></h3>
var el = document.querySelector('.ty3 .w'), words = ['websites', 'online shops', 'mobile apps'], i = 0, n = 0, del = false;
if (matchMedia('(prefers-reduced-motion: reduce)').matches) { el.textContent = words[0]; } else (function tick() {
var w = words[i]; n += del ? -1 : 1; el.textContent = w.slice(0, n);
var wait = del ? 50 : 100;
if (!del && n === w.length) { del = true; wait = 1400; } else if (del && n === 0) { del = false; i = (i + 1) % words.length; wait = 300; }
setTimeout(tick, wait);
})();
11. Terminal Command and Output
TypewriterTerminal
A command is typed at the prompt, then its output lines appear one by one, like a real terminal session. The typing uses steps() and the output lines fade in with delays that start after the typing ends.
No typing at all, just a block caret blinking after a finished heading, which gives a code-themed brand a hint of a terminal without making anyone wait to read. The caret is a decorative pseudo-element.
The line types a wrong word, pauses, deletes it and types the right one, a human touch for a hero or a cover letter site. A small script plays a list of type and delete steps; the finished sentence is in the HTML for screen readers and no-script visitors.
View code
<p class="ty6"><span class="sr">Websites that feel fast.</span><span class="v" aria-hidden="true">Websites that feel fast.</span></p>
var v = document.querySelector('.ty6 .v');
if (!matchMedia('(prefers-reduced-motion: reduce)').matches) {
var steps = [['t', 'Websites that feel slow'], ['w', 600], ['d', 4], ['t', 'fast.']], out = '', k = 0;
v.textContent = '';
(function run() {
var s = steps[k]; if (!s) return;
if (s[0] === 'w') { k++; setTimeout(run, s[1]); return; }
if (s[0] === 't') { if (s.n === undefined) s.n = 0; out += s[1][s.n++]; v.textContent = out; if (s.n >= s[1].length) k++; return setTimeout(run, 70); }
if (s[0] === 'd') { if (s.n === undefined) s.n = s[1]; out = out.slice(0, -1); v.textContent = out; if (--s.n <= 0) k++; return setTimeout(run, 60); }
})();
}
14. Typing Indicator Then Message
TypewriterChat
A chat bubble shows three bouncing dots while the other person types, then the message replaces them. The dots are aria-hidden with a visually hidden Typing label, and the final message lands in a polite live region so it is announced.
var w = document.querySelector('.ty7');
setTimeout(function () { w.innerHTML = '<div class="b">Hi! Your order shipped this morning.</div>'; }, 2600);
15. RGB Split Glitch
GlitchText
Two copies of the text in cyan and magenta jitter sideways behind the real one, clipped to thin slices that jump around. The copies come from attr(data-text) in pseudo-elements, so the word appears once in the DOM and is read once.
A link that is perfectly calm until it is hovered or focused, then glitches for a fraction of a second with shifted colour copies. Running the effect only on interaction keeps the page readable and turns the glitch into feedback.
View code
<a class="gl2" href="#enter" data-text="Enter the site">Enter the site</a>
Green terminal text behind horizontal scanlines and a faint flicker, the look of an old CRT monitor. The scanlines are a repeating linear gradient in a pseudo-element, and the flicker is a small opacity change well below anything that could count as flashing.
Horizontal slices of the word slide sideways by different amounts for a few frames, then snap back. Three stacked copies each show one slice through clip-path and share a stepped animation, while the original word stays as the readable layer.
The whole word skews and shifts sharply for a moment every few seconds, like a dropped video frame. It uses steps(1) so each keyframe holds without easing, which gives the hard, digital feel that smooth easing would soften.
Red and blue text-shadows wobble around the word at slightly different rates, creating chromatic noise without any extra elements. The offsets are only a few pixels so the word stays perfectly readable.
A not-found message with a glitching 404, a plain-language explanation and a link home. The glitch is decoration on the number only; the heading text, the help and the link carry everything a visitor needs.
View code
<section class="gl7"><h3><span class="n" data-text="404" aria-hidden="true">404</span><span class="sr">Error 404:</span> Page not found</h3><p>The page may have moved. Try the home page or search.</p><a href="#home">Go to the home page</a></section>
A pink neon sign that occasionally stutters, like a tube on its way out. Stacked text-shadows build the glow, and the flicker drops the shadows for a few irregular frames in a long loop. Under reduced motion the sign stays lit and steady.
Two words in two tube colours, cyan and violet, side by side on a brick-dark wall. Each word has its own shadow stack in its own colour, which is all a second neon colour needs.
Hollow letters with a glowing outline, closer to a real bent-glass tube than a filled glow. The outline is -webkit-text-stroke, the fill is transparent, and drop-shadow filters glow around the stroke rather than a solid shape.
A link that looks like an unlit tube at rest and switches on with a quick buzz when hovered or focused. The off state is a dim colour with no shadow; the on state adds the glow with a stepped animation that mimics the start-up flicker.
Everything is steady except one letter, which blinks out now and then, the detail that makes a neon sign believable. That letter is wrapped in a span with its own flicker animation, and the word still reads as one word.
Instead of flickering, the glow slowly swells and settles like the tube is breathing, a calmer neon for a sign-up banner. Only text-shadow blur radii change between two keyframes, on a three-second ease-in-out loop.
A small neon sign layout: a title in pink tube lettering inside a glowing frame and a plain list of items below, which stays readable because only the title glows. The frame is a border plus inset and outset box-shadows in the same colour.
Splitting a word into letter spans can make screen readers spell it out. Hide the split copy with aria-hidden and keep one plain copy of the sentence, visually hidden if necessary.
Masks for reveals
Wrap each word in an inline-block with overflow: hidden and slide the word up from 100 percent. The wrapper hides it until it rises, with no clip-path needed.
Changing words need a static version
A rotating word is fine to look at but confusing to hear. Give assistive technology a complete sentence that lists all the options, and hide the animated version from it.
Animate once, then rest
Text that keeps moving is hard to read. Run entrance effects once, keep loops for small decorative words, and stop everything under prefers-reduced-motion.
Frequently asked questions
Do text animations hurt SEO?
Not when the real text is in the HTML, which it is in every demo.
Why are some letters wrapped by JavaScript?
Splitting by hand is tedious; the script splits the text and adds an index for the stagger. The original text stays readable.
Can I use web fonts with these?
Yes. Load the font first to avoid the animation running on fallback text.