Skip to the content

Line reveal

Headings that come in line by line. As a heading enters the window, each of its lines rises from behind a mask, one after the other, and lands sharp.

Become a member to unlock the full effect today.

Join now

Already a member? Sign in

Documentation

  1. Copy to Webflow

    Add Geist and Geist Mono to your site's fonts (Site settings, Fonts, Google Fonts) before pasting: Webflow removes any font your site has not installed.

  2. Add custom CSS

    Before the script runs, a marked heading is hidden with visibility and keeps its room, so nothing below it moves. It shows by itself after four seconds if the script never comes, and at once without JavaScript, through the noscript line the paste carries inside its Embed. The Designer canvas runs no Embed: there the headings are always plain and editable.
  3. Add custom JS

  4. Use it on your own elements

    Custom attributes
    Select the element on the canvas and open the Settings panel. Under Custom attributes, add a pair: the name on the left, the value on the right.
    Custom attributeWhat it does
    data-line-reveal Marks a heading whose lines rise one after the other as it comes into view. It takes no value: leave the value field empty. It goes on the heading itself, an h1, h2 or h3, or on any block of text; the script finds the lines on screen, and bold words and links inside it stay as they are.
    data-line-reveal-skip On an inline element inside a marked heading: its words are left out of the split and stand still while the rest rises. [ Optional ]
    data-line-reveal-state Written by the engine on the heading: ready while it waits hidden, playing, done at rest, static under reduced motion. Never written by hand. [ Optional ]
    Settings
    Every setting is a custom attribute too, added the same way and on the same element. An attribute always wins over the defaults written in the code.
    AttributeDefaultWhat it is
    data-line-reveal-duration 1.1 Time one line takes from its hidden pose to rest, in seconds.
    data-line-reveal-stagger 0.08 Delay between the start of one line and the start of the next, in seconds.
    data-line-reveal-ease expo.out Shape of the rise: a CSS easing (cubic-bezier(...), ease-out) or a GSAP name the engine translates (expo.out, power1.out to power4.out, sine.out, circ.out, none). Options: any CSS easing or one of those names.
    data-line-reveal-delay 0 Wait before the first line starts, in seconds, once the heading is in view.
    data-line-reveal-offset 0.12 How far over the bottom edge of the window the heading has to come before it plays, as a share of the window height, 0 to 0.9.
    data-line-reveal-replay false Whether the heading plays again each time it comes back into view. Options: false (once, then it stays), true (it waits hidden again once it has fully left the window).

What it does

Line reveal is a text animation for Webflow and vanilla JavaScript, with no library. Also called line by line text reveal, line reveal animation or responsive text line reveal.

Headings that come in line by line. As a heading enters the window, each of its lines rises from behind a mask, one after the other, and lands sharp. The lines are the ones on screen: the script reads where the words fell at the width the heading has, and reads them again when the width or the font changes, so a heading of two lines on a desk is a heading of five on a phone and still rises line by line. Nothing is split by hand and nothing is cloned: bold, links and any inline markup stay the elements they were, around their own words. Each word rises straight up through a window of its own, fast then settling, so a line comes up as one clean edge. Before the script runs a marked heading keeps its room unseen, so nothing below it moves; without JavaScript it shows at once, and a screen reader reads the whole heading as one name. Under reduced motion the heading simply stands. Pattern type split text reveal, line mask reveal.

Updated

Questions

Select the Heading, open the Settings panel and add the custom attribute data-line-reveal with an empty value. The script wraps each word where it stands and finds the lines on screen. In the Designer the heading stays whole and editable: the hidden pose and the rise only exist on the published page and in the preview.

No. It needs no library: the lines are read from the layout, each word sits behind a clip-path mask and rises through a CSS transition, and an IntersectionObserver starts it. The ease setting still accepts GSAP names such as expo.out, the default, which the engine translates.

Yes. The lines are read again on every change of the heading's size and once each web font lands, so a heading of two lines on a desktop and five on a phone still rises line by line. A resize during the rise waits for it to end.

data-line-reveal-duration is the time one line takes to land, 1.1 seconds by default, and data-line-reveal-stagger is the delay between two lines, 0.08 by default: lower and the lines rise almost as one block, higher and they cascade. data-line-reveal-delay holds the first line back, so three headings side by side with 0, 0.1 and 0.2 come in as a row.

The heading still shows. It is hidden with visibility until the script runs, shows by itself after four seconds if the script never does, and the noscript line of the snippet shows it at once without JavaScript. Under prefers-reduced-motion it stands at rest from the start and never moves.