Skip to content

Scroll-driven masked text reveal

A paragraph whose words turn from grey to full ink, one by one, as the page scrolls, in pure CSS with a plain-text fallback.

  • Tailwind
  • React
  • CSS
  • WordPress
Open in a new tab

Description

Each word of the paragraph is painted through a mask: a hard-stop gradient, cut to the letter shapes with background-clip: text, slides from left to right as the page scrolls, driven by CSS view-timeline animations. Words ink up one after another while the paragraph crosses the screen, without a single line of JavaScript. Only the background position is animated: no reflow, no layout shift, and the text stays a real paragraph, read in one go by screen readers and selectable. The starting grey already keeps AA contrast in light and dark mode. In browsers without scroll-driven animations, with prefers-reduced-motion or in forced-colours mode, the text is shown fully inked at once. Colours set with variables (--etrm-ink, --etrm-dim), fluid size with no overflow at 360 px. Example: a joinery workshop in Annecy.

Code

Loading the code…

The code of this component in

Archive contents

effet-texte-revelation-masque-defilement-html-tailwind.zip3 files · 4 Ko

  • index.html5 Ko
  • README.md4 Ko
  • LICENSE.md1 Ko

Tags

Updated on December 2, 2026.

Reviews

No reviews yet.

In the same spirit

  • Cards that fade in as they enter the screen, one after another in each row, without a line of JavaScript and with a static fallback.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A translucent card with a saturated blur whose sharper edge refracts the colourful shapes drifting behind it, with an opaque fallback when transparency is reduced.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A help block shaped like a conversation: bubbles, three animated typing dots and clickable quick replies that show your answers to frequent questions, frozen under prefers-reduced-motion.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component