Sora UI

Text Reveal (Mask)

A scroll-triggered masked slide-up text reveal animation, powered by Motion. A React component.

Made by Axyl
Loading...

Scroll-triggered masked slide-up reveal — scroll the preview into view or refresh to replay.

Installation

npx shadcn@latest add @soralabs/text-reveal-mask

File Structure

text-reveal-mask.tsx

Usage

Props

PropTypeDefault
text?
string
""
children?
ReactNode
-
as?
keyof JSX.IntrinsicElements
"p"
splitBy?
"lines" | "words" | "chars"
"lines"
delay?
number
0
duration?
number
0.8 (lines), 0.6 (words), 0.4 (chars)
stagger?
number
0.08 (lines), 0.06 (words), 0.01 (chars)
yPercent?
number
110
once?
boolean
true
viewportMargin?
string
"0px 0px -25% 0px"
className?
string
-
unitClassName?
string
-

When to Use

Use MaskedTextReveal for large body copy, pull-quotes, or taglines in tall scroll sections where a staggered upward reveal adds drama. The splitBy="lines" default is most legible for multi-line paragraphs; switch to "words" for shorter, more energetic reveals.

For headings paired with a colored block wipe, use TextRevealBlock instead — the mask variant is optimized for multi-line typographic content.

Accessibility

Each animated unit slides up from behind a CSS overflow: hidden mask — the text is in the DOM throughout and readable by screen readers. Setting once={true} (the default) ensures the animation does not loop. When prefers-reduced-motion: reduce is active, the mask is removed and text is fully visible from the start.

Credits

Inspired by Annnimate. Reimplemented for Motion and React.

Built by Axyl. A motion-first component registry for React.

Last updated: 9/14/2026

On this page

Help keep SoraLabs moving.

Every contribution helps us build and maintain open-source tools for the community.

Sponsor on GitHub