HTML
<h2 data-a11y-text-split
data-split-type="words"
data-split-mode="visual"
data-split-scroll>
What enters will eventually leave.
</h2>Scroll reveal · Enter and exit
Words arrive from below, hold their shape, and recede upward. Scroll back to reverse the story.
Signal 01
Signal 02
Signal 03
Basic recipe
<h2 data-a11y-text-split
data-split-type="words"
data-split-mode="visual"
data-split-scroll>
What enters will eventually leave.
</h2>import { splitAll } from
'../dist/index.js';
import { scrollRevealAll } from
'../dist/scroll.js';
splitAll();
scrollRevealAll();The fallback records whether an element left above or below the viewport, allowing CSS to choose the correct exit direction without a scroll event listener.