Skip to content
All effectsCard

Stacking Cards

Each card parks under the next as it scrolls past. Sticky plus a view() timeline, no library.

Modern CSSCardPro

Usage

Meant for

CardCarouselChat Source

Examples

On a Card

Each card parks under the next as the list scrolls — position: sticky plus a scroll() timeline, no library and no scroll listener. Scroll the list to drive it; it opens part-way down so you can see the stack. Each card shrinks over its own stretch of scroll: --wm-i is its place, --wm-stack-step the scroll it takes the next card to cover it. Chrome 115+ and Safari 26+; elsewhere the cards just stack without the scale, which is the plain sticky behaviour.

Discovery
Step 1 of 4
Build
Step 2 of 4
Review
Step 3 of 4
Ship
Step 4 of 4

The class is wm wm-stacking-cards — the first half is the marker the trigger and reduced-motion rules hook into, the second is the effect.