Scroll Text — <mv-scroll-text>

Paragraph whose words (or letters) light up progressively as you scroll, from dim and blurred to sharp; scroll-driven CSS animations, JS fallback.

CategoryAnimated text
TypeWeb Component (<mv-scroll-text>)
Statusstable
Keywordsscroll, reveal, scroll-driven, view-timeline, words, storytelling, manifesto

When to use

Avoid when

Install

node scripts/add.mjs scroll-text --out ./src/marvelous

AI agent with the Marvelous UI MCP server: install_components({ slugs: ["scroll-text"], target_dir: "<absolute path>/src/marvelous", framework: "react" }).

Files copied (dependencies included): tokens/tokens.css, core/base.css, core/dom.js, core/element.js, core/observe.js, components/scroll-text/scroll-text.js, components/scroll-text/scroll-text.css.

Usage

Canonical markup — start from it and customize with attributes, data-* and CSS variables:

<div id="scroll-text-demo" style="height:340px;width:100%;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin">
  <div style="max-width:40rem;margin:0 auto;padding:2.5rem 1.5rem 20rem">
    <p style="margin:0 0 7rem;font-size:.8rem;letter-spacing:.14em;text-transform:uppercase;color:var(--mv-fg-subtle)">Scroll ↓</p>
    <mv-scroll-text style="font:600 clamp(1.4rem,3.2vw,2rem)/1.35 var(--mv-font-sans);letter-spacing:-.02em">
      We designed every detail to disappear. Fewer settings, less friction, more time for what really matters: building products your customers love to use.
    </mv-scroll-text>
    <mv-scroll-text by="chars" effect="float" start="20" end="60" style="margin-top:3rem;font:800 clamp(2rem,5vw,3rem)/1.1 var(--mv-font-sans);letter-spacing:-.04em;color:var(--mv-accent-fg)">
      Simple. Fast. Beautiful.
    </mv-scroll-text>
  </div>
</div>

API

Attributes

NameTypeDefaultDescription
bywords | charswordsAnimated unit.
effectblur | fade | floatblurblur: opacity + blur; fade: opacity only; float: units also rise.
startnumber (%)10Start of the reveal, as a % of the trip across the viewport (0 = the top of the block enters from the bottom).
endnumber (%)55When the last unit starts lighting up (50 ≈ block centered).

CSS variables

NameDefaultDescription
--mv-scroll-text-opacity0.16Opacity of words not reached yet.
--mv-scroll-text-blur0.08emInitial blur (effect=blur / float).
--mv-scroll-text-rise0.45emInitial vertical offset (effect=float).

Accessibility

The sentence is exposed once via a visually hidden copy; the animated units are aria-hidden. The text stays readable even before it’s revealed (adjustable opacity). Reduced motion: the paragraph is fully revealed. Inner markup (links, bold) is flattened: use it for plain text only.