Skip to content
All effects

Stacking cards

Cards pin to the top of the screen while the next one slides over them. Great for reviews, steps or questions.

Scroll

This is the real effect. Scroll or move your mouse inside the frame to try it.

The prompt

Add a stacking cards effect (also called a sticky card stack) to the cards in [the section I point to]. Behaviour: every card uses position: sticky with a top offset that grows a little per card (for example 8vh + 16px per card), so the top edges of earlier cards stay visible like a pile. While the next card slides over the current one, scale the covered card down to about 0.92 and dim it slightly, based on how far the next card has travelled. Use a passive scroll listener with requestAnimationFrame, no library. Details: the cards need their own solid background so each new card stands out against the one below it. transform-origin at the top centre, no layout shift, the last card never shrinks. Respect prefers-reduced-motion: keep the sticky stack but drop the scale and dim. It must work on mobile from 360px wide. Style: build it in the existing design system of this website. Reuse its colours, fonts, spacing, corner radius and existing classes or components, and don't add new colours or fonts. Use real content from this website for any text or images in the effect (its headings, services and copy), never placeholder text. If the project has no design system yet, ask me for the brand colours and fonts before you start.

What it is

A stack of cards that pin to the top of the screen. You scroll, the next card slides over the previous one, and the card underneath shrinks and darkens a little. It feels like dealing cards onto a table.

When it works

I use it for things people should read one at a time. Reviews, steps in a process, the questions in an FAQ. On the Living with Prompts program pages the objections work like this. Each card gets the full attention for a moment.

Get it right

  • Give every card its own background, otherwise the stack turns into one grey block.
  • Keep the shrink small. 5 to 8 percent is enough.
  • No more than six cards in one stack. People get tired of scrolling.
  • Switch the scaling off for people who prefer reduced motion.

Also called

  • Sticky card stack
  • Card stack on scroll
  • Pinned cards
  • Stacked scroll cards

More effects.

All effects