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
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
Reviews
No reviews yet.
In the same spirit

A large heading whose words turn from grey to ink as the page scrolls, then whose key phrases get a marker stroke, in pure CSS with a readable fallback.
- Tailwind
- React
- CSS
- WordPress

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

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

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