Skip to content

Kinetic variable-weight text

A large heading whose letters shift from thin to heavy in a wave on hover, keyboard focus or scroll on mobile, in pure CSS.

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

Description

Each letter of the heading exists in two weights stacked in the same grid cell: when the card is hovered, or when keyboard focus reaches its button, the thin weight fades out letter by letter in favour of the heavy one, with a slight bounce. On touch screens, which have no hover, the wave follows the scroll in browsers that support scroll-driven animations. Only opacity and transform are animated: the heading width never changes, nothing reflows around it, and the effect works with any font, variable or not. Without JavaScript and from the first paint, the real text is in the HTML: a single h2 read once by screen readers, with the decorative letters hidden, and AA contrast in light and dark mode. With prefers-reduced-motion the heading is shown heavy and still. Colours set with variables (--efpv-ink, --efpv-red), fluid rem size with no overflow at 360 px. Example: a letterpress print shop in Lyon.

Code

Loading the code…

The code of this component in

Archive contents

effet-texte-cinetique-poids-variable-html-tailwind.zip3 files · 5 Ko

  • index.html6 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