Per-character slot-machine reveal that rolls each letter into place once it scrolls into view, powered by Motion. React.
Installation
File Structure
Usage
Roll downward instead of up, and render as a heading:
Trigger every time it re-enters the viewport, with a wider margin:
Props
| Prop | Type | Default |
|---|---|---|
text | string | - |
direction? | "up" | "down" | "up" |
speed? | number | 0.05 |
duration? | number | 4 |
once? | boolean | true |
inViewMargin? | string | "-10%" |
as? | React.ElementType | "span" |
ref? | Ref<HTMLElement> | - |
className? | string | - |
When to Use
Use RollingText for a one-time reveal of a fixed string — hero headlines, section titles, anything that should roll into place once as the page or section is scrolled into view. It differs from Text Roll, which rolls between changing text values, and Text Loop, which cycles through a list of items on an interval.
Accessibility
The full string is exposed via aria-label on the root element; the individual rolling letter spans are aria-hidden, so screen readers announce the plain text rather than each animated glyph. When prefers-reduced-motion: reduce is set, the roll is skipped entirely and the text renders statically — no extra configuration needed.
Credits
Adapted from Skiper UI. Independent implementation for the Sora UI registry. Not affiliated with the original authors.
Built by Axyl. A motion-first component registry for React.
Last updated: 7/26/2026