Word Reveal

Word Reveal

A paragraph that reveals word-by-word as it scrolls through the viewport — ink rising to full strength, scrubbed directly to scroll position.

Installation

▸ Run the following command

npx shadcn@latest add https://www.mellowui.com/r/word-reveal.json

▸ Or install manually

  1. Install dependencies: pnpm add motion
  2. Copy the source from the Code tab above.
  3. Place it at components/mellow/word-reveal.tsx
  4. Import and use.

API Reference

PropTypeDefaultDescription
textstringThe paragraph to reveal. Wrap a word in asterisks (*word*) for the accent style.
as"p" | "h1" | "h2" | "h3" | "h4""p"Element type used for the wrapper.
fromOpacitynumber0.13Opacity of words before they're revealed.
offset[string, string]["start 0.8", "start 0.3"]Viewport offset pair passed to useScroll — where the reveal starts and ends.
overlapnumber3How many words overlap in the reveal window — higher is a softer wave.
accentClassNamestringClass applied to *accented* words. Defaults to serif italic.
classNamestringAdditional CSS classes for the wrapper.