Lerp

Split-text mask reveal

Demo
Split by
Curve

Headlines that rise line by line out of invisible masks, the SplitText look without the library.

How it works

Intro · Scroll· 23 sites

Reference: SplitText, GSAP

How it works

Headlines that rise line by line out of invisible masks, the SplitText look without the library.In 6 steps.

Studio and agency sites in the library reveal their headings the same way: the text is split into lines, each line sits in a box that clips it, and each rises into view a little after the one above. GSAP's SplitText is what most of them load. The effect needs three things: a split that follows the browser's own line breaks, masks with room for descenders, and a stagger short enough that the sentence still reads as one.

  1. 01

    Split into words first

    Wrap every word in an inline-block span. That keeps the browser's own wrapping, hyphenation aside, and gives each word a position.

  2. 02

    Group words into lines by their top

    Words whose offsetTop matches are on one line. Rebuild the heading as one block per line.

  3. 03

    Mask each line

    An outer span with overflow: clip and an inner span that moves. Pad the mask (about 0.12 em above, 0.18 em below) and pull the space back with negative margins, so descenders and italic overhangs are not cut off.

  4. 04

    Rise, one after another

    Animate the inner span from translateY(110%) to 0 with a strong ease-out (expo or power4), 0.6–1 s, 50–100 ms apart.

  5. 05

    Re-split on resize

    Line breaks change with the width; words and letters do not. Split again only when the width really changed.

  6. 06

    Keep it readable

    Put the full text in aria-label on the heading and hide the split spans from assistive tech, or screen readers spell out fragments.

Code

The code

The engine is the file the demo above runs, framework-agnostic; the Svelte and React tabs wire it into a component.

Pro

Copy the engine, React or Svelte version.

Unlock code with Pro

US$60/year or US$8/month. Cancel anytime.

Prompt

Prompt pack

Headlines that rise line by line out of invisible masks, the SplitText look without the library.

1 prompts in Pro Generated 25 Sep 2026

  • Build it with a coding agentA dependency-free split reveal, as a brief for any coding agent.

Pro opens every prompt, with the measured values filled in and ready to paste into your coding agent.

Unlock prompts with Pro

US$60/year or US$8/month. Cancel anytime.

Performance & accessibility

Performance

Only transform animates, on the compositor. The cost is the split: it touches the DOM once per heading and forces a layout to read line positions, so split after fonts have loaded (a late font changes the breaks) and only headings in or near view. Hundreds of split spans across a page add up; keep letter splits for short words.

Reduced motion

Under prefers-reduced-motion, fade the lines in with the same stagger and no travel, or show the heading at once. The heading's aria-label keeps the full sentence either way.

Source

Source, credited

GSAP's SplitText defines the look, and most of the linked sites load it (the library notes record line reveals of 0.6–0.9 s with 70–100 ms staggers, estimates from their captures). The engine here is an independent implementation with the Web Animations API.

Seen in the library

Sites using this effect.