Skip to content

Stacking cards on scroll

Step cards that stick to the top of the screen and stack on top of each other while scrolling, with no script.

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

Description

Each card of an ordered list is position: sticky with an increasing offset: as you scroll, the next card covers the previous one while leaving its edge visible, like a pile of index cards forming before the visitor’s eyes. It is a very readable way to tell a method, a process or a set of offers, here the four steps of a renovation. In browsers that support scroll-driven animations (animation-timeline: view()), each card grows slightly as it enters; elsewhere the stacking works as is. No script, a real ordered list with level 3 headings, decorative numbers hidden from screen readers, AA contrast in light and dark mode. The offset is set with each card’s --efce-i variable. With prefers-reduced-motion the growth is removed and only the stacking, driven by the user’s own scrolling, remains.

Code

Loading the code…

The code of this component in

Archive contents

effet-cartes-empilees-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