Lerp

Scroll text brightening

Demo

A paragraph comes into full ink word by word as native scroll advances.

How it works

Scroll· 6 sites

Reference: CSS opacity, MDN contributors

How it works

A paragraph comes into full ink word by word as native scroll advances.In 5 steps.

Use progress as a reading guide, never as a gate on the words. The semantic paragraph stays intact; decorative word spans only change opacity. This is scroll-driven emphasis, distinct from the timed SplitText entrance technique.

The controls below are authored demonstration values, not measurements of the linked sites. The stored fits currently describe scroll smoothing and intro curves, not this effect's geometry; see each site's spec sheet for those separately measured values and fit errors.

  1. 01

    Preserve one accessible paragraph

    Keep a plain text paragraph for assistive technology and hide the decorative spans from it. Never announce every opacity change.

  2. 02

    Split at word boundaries

    Keep spaces and wrapping intact. Build the spans once, not while scrolling.

  3. 03

    Advance a small brightening window

    Each word clamps its distance from the progress frontier to the unit interval; softness sets how many words share the transition.

  4. 04

    Show all ink in the still

    Reduced motion removes the long runway and makes every word fully readable.

  5. 05

    Dispose cleanly

    Call destroy() when the view unmounts to disconnect resize and preference observers, remove scroll listeners and cancel pending frames.

Code

The code

The engine is the file the demo above runs, framework-agnostic; the Svelte and React tabs wire it into a component.

Pro

Copy the engine, React or Svelte version.

Unlock code with Pro

US$60/year or US$8/month. Cancel anytime.

Prompt

Prompt pack

A paragraph comes into full ink word by word as native scroll advances.

1 prompts in Pro Generated 25 Sep 2026

  • Build it with a coding agentA framework-independent implementation brief with authored controls.

Pro opens every prompt, with the measured values filled in and ready to paste into your coding agent.

Unlock prompts with Pro

US$60/year or US$8/month. Cancel anytime.

Performance & accessibility

Performance

Only a short paragraph changes opacity; no text is rewritten on a frame. Bound the word count and avoid per-letter DOM or blur. Long articles should stay static. The demo targets a frame budget suitable for phone displays; profile on the target device rather than treating an unloaded desktop frame counter as a guarantee. The host pauses the demo off screen. The standalone engine removes its observers and listeners on destroy.

Reduced motion

Reduced motion gives a readable still or ordinary document flow, without an automatic loop. Live preference changes are respected. The scroll region is keyboard-focusable; touch remains native. Keep essential information outside decorative layers and do not add live announcements for motion.

Source

Source, credited

Original teaching implementation and CSS artwork, informed by the credited CSS opacity documentation and the library's linked site observations. No source site's code or assets are reproduced. A site link describes the observed visual pattern, not proof that the site uses this engine or browser API.

Seen in the library

Sites using this effect.