BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/ui-beats/scroll-reveal

Scroll Reveal

ui-beats/scroll-reveal
FreeComponent

The ScrollReveal component lights up text word by word as the reader scrolls past it, tied to scroll position rather than a timer.

Install it

npx shadcn@latest add https://uibeats.com/r/scroll-reveal.json

Source

components/demo/text/scroll-reveal.tsxuibeats.com/r/scroll-reveal.json
1"use client";
2
3import {
4 motion,
5 useScroll,
6 useTransform,
7 useReducedMotion,
8 type MotionValue,
9} from "motion/react";
10import { useRef } from "react";
11
12interface ScrollRevealProps {
13 children: string;
14 /** Opacity of a word before it is reached. */
15 restingOpacity?: number;
16 /** How much of the viewport the reveal is spread across, 0-1. */
17 spread?: number;
18 className?: string;
19}
20
21/**
22 * Text that lights up word by word as the reader scrolls past it.
23 *
24 * Each word maps its own slice of the container's scroll progress, so the
25 * reveal tracks the scrollbar exactly — scroll back up and it un-reveals.
26 * A time-based stagger would drift out of sync with the reader.
27 */
28export function ScrollReveal({
29 children,
30 restingOpacity = 0.15,
31 spread = 0.5,
32 className = "",
33}: ScrollRevealProps) {
34 const ref = useRef<HTMLParagraphElement>(null);
35 const prefersReducedMotion = useReducedMotion();
36
37 const { scrollYProgress } = useScroll({
38 target: ref,
39 offset: ["start 0.9", `end ${spread}`],
40 });
41
42 const words = children.split(" ");
43
44 if (prefersReducedMotion) {
45 return <p className={className}>{children}</p>;
46 }
47
48 return (
49 <p ref={ref} className={`flex flex-wrap ${className}`}>
50 {words.map((word, index) => {
51 const start = index / words.length;
52 const end = start + 1 / words.length;
53
54 return (
55 <Word
56 key={`${word}-${index}`}
57 progress={scrollYProgress}
58 range={[start, end]}
59 restingOpacity={restingOpacity}
60 >
61 {word}
62 </Word>
63 );
64 })}
65 </p>
66 );
67}
68
69interface WordProps {
70 children: string;
71 progress: MotionValue<number>;
72 range: [number, number];
73 restingOpacity: number;
74}
75
76function Word({ children, progress, range, restingOpacity }: WordProps) {
77 const opacity = useTransform(progress, range, [restingOpacity, 1]);
78 // A touch of blur on the way in makes the arrival read as focus rather than
79 // as a flat fade.
80 const filter = useTransform(progress, range, [
81 "blur(4px)",
82 "blur(0px)",
83 ] as const);
84
85 return (
86 <span className="relative mr-[0.25em] inline-block">
87 <motion.span style={{ opacity, filter }}>{children}</motion.span>
88 </span>
89 );
90}
91
92export default ScrollReveal;

What it pulls in

npm packages

  • motion

Files it writes

  • components/ui/scroll-reveal.tsx

Facts

Registry
ui-beats
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
In the index
at or before 2026-08-13
Last confirmed
yesterday

Go to the source

uibeats.com Raw registry item This item as JSON

More from ui-beats

All 34 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Animated Beamanimated-beamui-beatsComponentsFree1 dep
Animated Listanimated-listui-beatsComponentsFree1 dep
Border Beamborder-beamui-beatsComponentsFree1 dep
Bouncebounceui-beatsComponentsFree1 dep
Card Stackcard-stackui-beatsComponentsFree1 dep
Dockdockui-beatsComponentsFree1 dep
Fade Infade-inui-beatsComponentsFree1 dep
Fade In Unblurfade-in-unblurui-beatsComponentsFree1 dep

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored from measured facts

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex