Copied!
Guide

Split text animation without GSAP

The headline whose words rise into place one after another is a few spans, a mask and a staggered delay. Here is how to split text yourself without breaking screen readers or line wrapping.

← Blog
Title card: Split text animation. Preview of the Split text reveal element from the Enrichr Library.

December 4, 2026

3 min readA plain SplitText alternative

To animate a headline word by word without GSAP, wrap each word in a pair of spans, hide the inner span below a clipping edge, and slide it up with a delay based on the word's position. A few lines of JavaScript do the splitting and CSS does the motion. The free Enrichr Library has several finished versions.

Try it on any site. The free animation library checker shows you which animation libraries actually run on a page (GSAP, Lenis, Framer Motion). Paste a URL, no sign-up for your first lookup.

What is the code?

function splitWords(el) {
  const text = el.textContent.trim();
  el.setAttribute("aria-label", text);
  el.innerHTML = text.split(/\s+/).map((word, i) =>
    `<span class="w" aria-hidden="true"><span style="--i:${i}">${word}</span></span>`
  ).join(" ");
}

document.querySelectorAll(".split").forEach((el) => {
  splitWords(el);
  new IntersectionObserver(([entry], io) => {
    if (entry.isIntersecting) { el.classList.add("is-in"); io.disconnect(); }
  }, { threshold: 0.4 }).observe(el);
});
.split .w { display: inline-block; overflow: hidden; vertical-align: bottom; }
.split .w > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: calc(var(--i) * 60ms);
}
.split.is-in .w > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .split .w > span { transform: none; transition: none; }
}

If the heading holds text you did not write, escape it before putting it into innerHTML, or build the spans with document.createElement.

Why two spans per word?

The outer span is the mask. It has overflow: hidden and stays where the word belongs. The inner span starts just below it and slides up into view. That is what makes the word look as if it rises out of a slot instead of fading in.

How do I split into letters?

const letters = [...new Intl.Segmenter().segment(word)].map((s) => s.segment);

Intl.Segmenter keeps emoji and combined characters in one piece. Keep each word in its own inline-block wrapper with the letters inside, or the browser may break a line in the middle of a word.

What goes wrong most often?

Which finished examples can I copy?

ElementWhat it does
Split text revealA headline whose words rise out of a mask one after another when it scrolls into view.
Letter pop introEach letter overshoots its size and settles, staggered left to right.
Hover lift typeBig uppercase type that rises into place letter by letter, then lifts under the pointer.
Stagger letter swapTwo screens of big type that swap, every character sliding out in a stagger.
Kinetic type revealsNine ways for a line of type to arrive.

Where to go next

FAQ

How do I split text into letters in JavaScript?

Use Array.from(text) or Intl.Segmenter rather than text.split(""). The plain split cuts emoji and some accented letters in half.

Is GSAP SplitText free?

Yes. GSAP and its plugins, including SplitText, are free to use now. See is GSAP free? for the terms. For a single headline, the plain version below is less code to load.

How do I animate text line by line?

Lines only exist after the browser has laid the text out. Split into words first, then group words that share the same offsetTop. You must redo this when the window is resized.

Does splitting text hurt SEO?

Search engines read the text content of the spans, so the words are still there. Keep the heading a real heading element and do not hide the text with display: none.