Text Reveal
A scroll-scrubbed text reveal engine. Choose character or word units and five genuinely different reveal orders, including a position-measured diagonal sweep that recalculates as text wraps.
Installation#
pnpm dlx shadcn@latest add @davinciui/text-revealUsage#
Compare all seven reveal combinations on the Text Reveal test page.
API Reference#
| Prop | Type | Default |
|---|---|---|
textText content. Browser wrapping is preserved; whitespace and line breaks stay in place. | string | "DavinciUI brings a growing library of thoughtfully crafted components and flexible patterns together, helping teams build polished, consistent interfaces faster. Explore, customize every detail, and bring motion-rich experiences to life—from the first prototype through the final product." |
revealStyleReveal ordering. Spatial styles are measured from rendered unit positions. | "linear" | "diagonal" | "random" | "center-out" | "edges-in" | "linear" |
revealByAnimation unit. Character mode keeps each word grouped so natural wrapping occurs between words. | "characters" | "words" | "words" |
diagonalDirectionPhysical sweep direction; applies to the diagonal style. | "top-left-to-bottom-right" | "top-right-to-bottom-left" | "bottom-left-to-top-right" | "bottom-right-to-top-left" | "top-left-to-bottom-right" |
fromOpacity / toOpacityOpacity at the beginning and end of each unit's soft reveal. | number | 0.15 / 1 |
revealedColor / unrevealedColorColors interpolate with opacity. Set them equal to use opacity alone. | string | "#FFFFFF" / "#FFFFFF" |
revealSoftnessFraction of the scroll range used to fade each unit between its dim and revealed states. | number | 0.24 |
startPosition / endPositionGSAP start and end expressions controlling the scroll distance for a complete reveal. | ScrollTrigger positions | "top 80%" / "bottom 40%" |
startOffset / endOffsetAdditional pixel offsets applied to the start and end positions. | number | 0 |
scrubTie reveal progress to scrolling. Disable to play on entering the trigger range. | boolean | true |
scrubSmoothnessNumeric GSAP scrub catch-up duration in seconds. Zero uses direct scrub. | number | 0.3 |
fontNative typography control for family, size, style, weight, line height, letter spacing, and alignment. React consumers can also set the individual font props. | Framer Font control | Inter · 32px / 600 / 1.4 |
xOffset / yOffsetOptional starting position offsets, in pixels. | number | 0 / 0 |
scaleFrom / blurFromOptional starting scale and blur amount. | number | 1 / 0 |
randomSeedStable random ordering seed; used by the random style. | number | 1 |
respectReducedMotionShow all text in its final state when reduced motion is preferred. | boolean | true |
Accessibility#
A visually hidden span exposes the full text as one readable string while the animated units are aria-hidden, so screen readers do not announce split words. There is no interactive or focus behavior.
Motion#
GSAP ScrollTrigger scrubs per-unit opacity, color, and optional x, y, scale, or blur between startPosition and endPosition; revealSoftness sets stagger and scrubSmoothness sets lag. respectReducedMotion (default true) renders the final state when prefers-reduced-motion matches.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

