Roll Reveal
Text that rolls up into place a word at a time, each word rising through an invisible line as it scrolls into view.
Each word rolls up into place, one after another.
Props
By
Roll35
Stagger0.05
Duration0.80
Installation
pnpm dlx shadcn@latest add @breeze/roll-revealUsage
import { RollReveal } from "@/components/breeze/roll-reveal"It renders a <p> by default and takes your own classes, so style it like any other text.
<RollReveal
text="Each word rolls up into place, one after another."
className="text-3xl font-medium tracking-tight"
/>Use as for a heading, and \n for a new line:
<RollReveal as="h1" text={"Built to move.\nMade to last."} className="text-5xl font-semibold" />Props
| Prop | Type | Default | Description |
|---|---|---|---|
text | string | — | The text to reveal. \n starts a new line |
as | "p" | "h1" | "h2" | "h3" | "h4" | "span" | "div" | "p" | The element to render |
by | "word" | "letter" | "word" | Roll in a word at a time, or a letter at a time |
roll | number | 35 | How far each piece tips back as it rolls in, in degrees. 0 slides straight up |
stagger | number | 0.05 | Seconds between one piece and the next |
duration | number | 0.8 | Seconds each piece takes to roll in |
delay | number | 0 | Seconds before the first piece starts |
trigger | "view" | "mount" | "view" | Play when it scrolls into view, or as soon as it mounts |
once | boolean | true | Only play the first time it comes into view |
Each word waits just below an invisible line and rises through it, tipping forward as if it's rolling over a drum. With by="letter", words still never break across lines mid-word. Screen readers get the whole text at once, and with reduced motion the text simply shows, with no animation.
Examples
Letter by letter
Roll call.
<RollReveal
by="letter"
stagger={0.03}
roll={60}
text="Roll call."
className="text-4xl font-semibold tracking-tight"
/>