Scroll Text Reveal
Scroll Text Reveal is a text scroll effect in the UI HUB text scroll collection. A scroll-scrubbed halftone text reveal with no animation library: one rAF-throttled scroll loop plus CSS background-clip: text. The copy is split into word spans (inline-block, nowrap) wrapping one inline-block span per character, with a .24em spacer span between words.
The component is driven by 7 documented props (compact, paragraphs, start, end, stagger, cell and 1 more), so colours, intensity, timing and density can be tuned from the call site instead of being hard-coded.
Implementation notes: no animation library, one rAF-throttled scroll loop; CSS background-clip: text halftone rendering; document.fonts.ready gating the first measure.
Preview the text scroll effect in the browser above, copy the source, and paste it into your project. Text Scroll components in UI HUB are grouped by category so you can compare effects side by side before choosing one.
What is Scroll Text Reveal?
A halftone scroll reveal: uppercase Anton paragraphs sit in flat grey, then every glyph dissolves through a growing dot tile, grey to acid green to solid ink, left to right and line by line as you scroll, and rewinds when you scroll back up.
Scroll Text Reveal at a glance
- Category
- Text Scroll
- Pricing
- Free to use
- Libraries
- React, react-router-dom, Lucide React and google fonts (Anton)
- Language
- TypeScript
- Styling
- Tailwind CSS
- Configurable props
- 7
- AI prompts
- Ready for Advance, Antigravity, Claude Code, Cursor, Lovable
How Scroll Text Reveal works
A scroll-scrubbed halftone text reveal with no animation library: one rAF-throttled scroll loop plus CSS background-clip: text. The copy is split into word spans (inline-block, nowrap) wrapping one inline-block span per character, with a .24em spacer span between words. Every character is transparent with -webkit-background-clip: text / background-clip: text and a 4px background tile, so a radial-gradient halftone is clipped to the glyph shape and the text itself never moves. Measure per resize: each glyph stores its vertical centre in scroller content space (rect.top - paneTop + scrollTop + rect.height / 2) and its horizontal fraction across the reveal block, x = clamp((rect.left - block.left) / block.width, 0, 1). Per frame: top = vh * END (0.40), bottom = vh * START (0.94), span = bottom - top, then for each glyph yv = charY - scrollTop, t = (bottom - yv) / span and p = clamp(t * (1 + STAGGER) - x * STAGGER, 0, 1) with STAGGER 0.55. Painting is two dithered stages: below 0.5 blend grey rgb(216,216,210) -> green rgb(107,255,58) with q = p / 0.5; at or above 0.5 blend green -> ink rgb(5,5,5) with q = (p - 0.5) / 0.5. backgroundColor takes the from-colour and backgroundImage becomes radial-gradient(circle at 50% 50%, <to-colour> Rpx, transparent R+0.7px) with R = (q * CELL * 0.72).toFixed(2), so the dot radius grows from 0 until it covers the cell. p <= 0 clears the image and restores flat grey; p >= 1 clears the image and sets solid ink. The last painted bucket (Math.round(p * 200)) is cached per glyph so unchanged characters are skipped. The first measure waits on document.fonts.ready; a ResizeObserver plus window resize re-measure, and the scroll target is listened to passively. Full mode renders a small 0.2-vh lead-in spacer (so the copy is on screen the moment the component is), the block and a 0.7-vh tail spacer (0.7 >= 1 - END, the condition for the last glyph to be able to reach full ink) and follows whichever ancestor actually scrolls (walking up the DOM checking computed overflowY for auto / scroll / overlay, falling back to window); compact mode renders an invisible 100%-height scroll column inside the card and drives everything from that column's clientHeight and scrollTop. The resolved viewport height is written to a --str-vh custom property that sizes the spacers through calc(0.2 * var(--str-vh)) and calc(0.7 * var(--str-vh)).
Technical information for Scroll Text Reveal
| Category | Text Scroll |
|---|---|
| Libraries | React, react-router-dom, Lucide React and google fonts (Anton) |
| Styling | Tailwind CSS |
| Language | TypeScript |
| Rendering | CSS gradients |
| State change | both paragraphs sitting in flat paper grey rgb(216,216,210) on #f1f1e8, untouched to every glyph dissolved to solid ink rgb(5,5,5) through a halftone dot tile, fully reversible by scrolling back up |
| Props | 7 configurable |
| Usage example | Included on this page |
What Scroll Text Reveal requires
- no animation library, one rAF-throttled scroll loop
- CSS background-clip: text halftone rendering
- document.fonts.ready gating the first measure
- ResizeObserver re-measure
- computed-style scroll parent resolution for embedded use
- Google Fonts Anton via CSS @import
How to use Scroll Text Reveal
- Install the dependencies: npm install react-router-dom and npm install lucide-react and npm install google fonts (Anton).
- Copy the usage example from the Source section of this page. It shows the import path and the props the component expects.
- Render <ScrollTextReveal /> in your page using that import path.
- Pass any of the 7 documented props to change colours, density, speed or behaviour.
Scroll Text Reveal questions
What is Scroll Text Reveal?
A halftone scroll reveal: uppercase Anton paragraphs sit in flat grey, then every glyph dissolves through a growing dot tile, grey to acid green to solid ink, left to right and line by line as you scroll, and rewinds when you scroll back up.
How does Scroll Text Reveal work?
A scroll-scrubbed halftone text reveal with no animation library: one rAF-throttled scroll loop plus CSS background-clip: text. The copy is split into word spans (inline-block, nowrap) wrapping one inline-block span per character, with a .24em spacer span between words. Every character is transparent with -webkit-background-clip: text / background-clip: text and a 4px background tile, so a radial-gradient halftone is clipped to the glyph shape and the text itself never moves. Measure per resize: each glyph stores its vertical centre in scroller content space (rect.top - paneTop + scrollTop + rect.height / 2) and its horizontal fraction across the reveal block, x = clamp((rect.left - block.left) / block.width, 0, 1). Per frame: top = vh * END (0.40), bottom = vh * START (0.94), span = bottom - top, then for each glyph yv = charY - scrollTop, t = (bottom - yv) / span and p = clamp(t * (1 + STAGGER) - x * STAGGER, 0, 1) with STAGGER 0.55. Painting is two dithered stages: below 0.5 blend grey rgb(216,216,210) -> green rgb(107,255,58) with q = p / 0.5; at or above 0.5 blend green -> ink rgb(5,5,5) with q = (p - 0.5) / 0.5. backgroundColor takes the from-colour and backgroundImage becomes radial-gradient(circle at 50% 50%, <to-colour> Rpx, transparent R+0.7px) with R = (q * CELL * 0.72).toFixed(2), so the dot radius grows from 0 until it covers the cell. p <= 0 clears the image and restores flat grey; p >= 1 clears the image and sets solid ink. The last painted bucket (Math.round(p * 200)) is cached per glyph so unchanged characters are skipped. The first measure waits on document.fonts.ready; a ResizeObserver plus window resize re-measure, and the scroll target is listened to passively. Full mode renders a small 0.2-vh lead-in spacer (so the copy is on screen the moment the component is), the block and a 0.7-vh tail spacer (0.7 >= 1 - END, the condition for the last glyph to be able to reach full ink) and follows whichever ancestor actually scrolls (walking up the DOM checking computed overflowY for auto / scroll / overlay, falling back to window); compact mode renders an invisible 100%-height scroll column inside the card and drives everything from that column's clientHeight and scrollTop. The resolved viewport height is written to a --str-vh custom property that sizes the spacers through calc(0.2 * var(--str-vh)) and calc(0.7 * var(--str-vh)).
Which category does Scroll Text Reveal belong to?
Scroll Text Reveal is listed under Text Scroll in the UI HUB catalog. Scroll-driven typography that animates as the page moves: words that slide, pin, fade or reveal in sync with scroll position instead of playing once on load. Each component documents whether it drives motion from native scroll events, GSAP ScrollTrigger or Framer Motion, which matters on long pages. Pair them with a pinned section for the strongest effect.
What does the compact prop do in Scroll Text Reveal?
Preview mode: the reveal fills its container and is driven by an invisible scroll column inside the card instead of the page. It defaults to false.
What does the paragraphs prop do in Scroll Text Reveal?
Copy that is split into word and character spans and revealed by scroll. Each string becomes one paragraph. It defaults to two UI HUB paragraphs.
Is Scroll Text Reveal free to use?
Scroll Text Reveal is a free component on UI HUB. You can preview it in the browser and read the full props table on the component page.
Which libraries does Scroll Text Reveal use?
Scroll Text Reveal uses React, react-router-dom, Lucide React and google fonts (Anton) and is styled with Tailwind CSS.
What does Scroll Text Reveal need to run?
Scroll Text Reveal needs no animation library, one rAF-throttled scroll loop, CSS background-clip: text halftone rendering, document.fonts.ready gating the first measure and ResizeObserver re-measure.