blaze-motion
← All components

Line Reveal

Text

Per-line rise + fade, staggered and calm — each line clips inside its own mask.

Installation

One command drops the source into your repo — editable, with the provider and motion pulled in automatically.

npx shadcn add https://motion.asmitsah.dev/r/line-reveal.json

Usage

Basic

Wrap your own element — its tag + className win. Splits the string on \n; each line rises inside its own overflow-hidden wrapper, staggered by feel.lineStagger. aria-label carries the full passage.

import { LineReveal } from "@/components/motion/line-reveal";

<LineReveal>
  <p className="text-lg leading-relaxed">
    {"Calm, deliberate motion.\nOne line at a time."}
  </p>
</LineReveal>

trigger="mount"

Play immediately on render instead of waiting for scroll — good for hero copy above the fold.

<LineReveal trigger="mount">
  <p>{"Rises the moment it mounts.\nNo scroll required."}</p>
</LineReveal>

With delay

Offset a LineReveal behind a sibling to sequence a heading and its body copy.

<Fade>
  <h2>Leads</h2>
</Fade>
<LineReveal delay={0.15}>
  <p>{"Follows, a beat later.\nLine by line."}</p>
</LineReveal>

Props

PropTypeDefaultDescription
childrenReactElementA single host element (h1–h6/p/span/div) wrapping a plain-string passage split on \n. Its tag, className + style are reused and it carries the aria-label. Required.
trigger"inView" | "mount""inView"inView rises once at 30% visible; mount plays immediately on render.
delaynumber0Seconds before the first line's stagger begins.