Sora UI

Text Reveal (Mask)

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

Made by Axyl

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

Loading...

Installation

File Structure

text-reveal-mask.tsx

Usage

import { MaskedTextReveal } from '@/components/sora-ui/texts/text-reveal-mask';

export default function Page() {
  return (
    <MaskedTextReveal
      as="h2"
      splitBy="lines"
      stagger={0.1}
      className="text-center text-3xl leading-tight text-foreground/75 [&_strong]:font-medium [&_strong]:text-foreground"
    >
      Every stride is a statement. Every finish line a new beginning. We build
      gear for athletes who refuse to settle for <strong>yesterday&apos;s pace</strong>.
    </MaskedTextReveal>
  );
}

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: 7/26/2026