ScrollPremium

Stagger Cards

A stack of slim cards, one line each, that settle one after another: each card rises 30 px and turns opaque over the first 20 pixels of its passage under the bottom edge of the area. The cascade comes from no timer — each card has its own view() timeline, and the next one simply sits 61 px lower. CSS only.

CSSStaggerCards

Updated

This effect is part of Effect.Labs — 846 vanilla effects, some free, some premium. Scroll has 74 effects, including 12 free. Explore the category →

3 usage examples

Today's sessions at an ice rink — mobile app — Stagger Cards example 1

① Today's sessions at an ice rink — mobile app

WhenOn a phone, the day's programme in nine lines: time, session name, detail, coloured dot. You thumb through from opening to the evening session.
Why51 px lines, 8 px apart: one comes in every 59 px of gesture, just enough for the eye to catch each time before the next.
SettingsCard turned into a time + text + dot grid, white background, gap brought down to 8 px; range and distance from the code. 248 px area in a phone frame, 300 px of travel. In the capture, a script advances the scrolling one notch per frame.
Items scanned at a garden centre till — each beep adds a line to the receipt — Stagger Cards example 2

② Items scanned at a garden centre till — each beep adds a line to the receipt

WhenTill screen: on the left the last item and the “Scan the next item” button, on the right the receipt. At each beep the receipt moves down one line and the new line rises into place; the total follows.
WhyThe line that arrives is the one just scanned: its rise confirms the gesture without a banner or a sound. The effect knows nothing about the beep — it reacts to the one-line scroll the button causes.
Settings33 px lines with no background or radius, range widened to entry 0% entry 100% so the rise lasts the line's whole entry, scroll-behavior: auto. All twelve lines are in the page; the button, the total and the side panel are handled by a script in the scene, which also sends the capture's clicks.
Results under the search field — command palette of a podcast editing app — Stagger Cards example 3

③ Results under the search field — command palette of a podcast editing app

WhenA palette floating above the tracks: two letters typed, eleven commands offered with their shortcut. The wheel scrolls the list inside the palette.
WhyIn a list of look-alike commands, the line-by-line arrival helps you keep your place while scrolling; the movement is short enough not to slow down someone who is searching.
SettingsColours from the code (dark theme), compact 40 px cards 4 px apart, icon on the left and shortcut on the right; 216 px area. In the capture, scrolling is driven by script.

How it works

The stage .sb-stagger-content is a flex column with a 12 px gap; it holds six .sb-stagger-card elements 49 px tall (16 px padding, centred 13.6 px bold text). The scrolling area is 280 px: on opening, the first four cards are in place, the fifth waits 4 px below the bottom edge, invisible, the sixth 65 px lower.

Each card starts at opacity: 0; translateY(30px) and plays fx0540FadeUp on animation-timeline: view(), range entry entry 40%. The entry of a 49 px card lasts 49 px of scrolling; 40% makes just under 20. Readings: the fifth card goes from 0 to 1 between 4 and 24 px scrolled (0.51 at 14 px), the sixth between 65 and 85. In between, nothing moves: that rhythm — a card, a pause, a card — is what reads as dealing.

The effect's name comes from a habit: staggering elements with animation-delay. On a scroll timeline a delay in milliseconds does nothing, and the code contains none; its CSS says so in a comment. If you want a card to trail, move its range — animation-range: entry 20% entry 60% starts it once a fifth of it has entered. The stage has no imposed height: it measures its six cards plus 40 px of padding top and bottom (434 px), so the travel ends at 154 px, 69 px after the last arrival.

Accessibility

  • List: six divs in a row, with no role. Lines of the same kind — times, results, items — deserve ul/li, or buttons and links if they can be activated; the effect's classes go on any tag.
  • What is hidden stays readable by machines: a card below the bottom edge is at opacity: 0, not removed. A screen reader reads it and the Tab key reaches it if it holds a link; the browser then scrolls it into view, which plays its entry.
  • Reduced motion: under prefers-reduced-motion, the 30 px rise is dropped (transform: none) and the animation becomes a plain fade, still set by the scroll: an entering card brightens where it sits (measured: fifth card at 0 at rest, at 1 after 120 px). The hint stops blinking and smooth scrolling is turned off. To show everything at once, replace animation-name in that block with animation: none; opacity: 1.
  • Contrast, keyboard: white on an almost black card background, 18:1; the “Scroll ↓” hint, white at 50% opacity at its faintest, holds 5.3:1; it is hidden from screen readers (aria-hidden); remove it in production. The area carries tabindex="0", role="region" and an aria-label: Tab stops on it in Chromium 149, Firefox 151 and WebKit 26.5, then the arrows walk it (40 px per press in Chromium, 51 in Firefox), under a 2 px violet outline drawn inside.

Browser compatibility

A single recent feature: animation-timeline: view() with animation-range, available in Chrome and Edge 115, Safari 26 and, per MDN, Firefox 159. Identical readings in Chromium 149 and WebKit 26.5. The Firefox 151 test build shows the six cards flat. No script, no request.

Chrome 115+✓ Full (measured, Chromium 149)
Edge 115+✓ Full according to the tables, not verified
Safari 26+✓ Full in the WebKit 26.5 test build; real Safari not verified
Firefox before 159✓ Cards in place, no animation (measured, Firefox 151)
Firefox 159+✓ Full according to the tables — not verified
Safari before 26✓ Cards in place, no animation — not verified

The starting zero opacity only exists inside @supports (animation-timeline: view()). A browser that fails that test applies neither the hidden state nor the animation: the list is there, whole. A list shorter than its area shows the same way, for lack of travel.

The code

HTML structure to paste into your page (the CSS + JS come with your purchase):

index.html — structure
<div class="fx-0540-root">
  <div class="sdc-scroll-container" tabindex="0" role="region" aria-label="…">
    <div class="sb-stagger-content">
      <div class="sb-stagger-card">…</div>
      … ×6
    </div>
  </div>
  <span class="sdc-scroll-hint" aria-hidden="true">…</span>
</div>

One-time payment, no subscription — the code is yours forever

Customize

Options passed to the API or data-* attributes:

Option / propertyDefaultEffect
Reveal range (CSS — animation-range: entry entry 40%) 40% of the entry, that is 20 px for a 49 px card entry 0% entry 100% spreads the rise over the card's whole entry. entry 0% cover 30% carries it well beyond: two neighbouring cards are then mid-reveal at the same time (tried: 0.77 and 0.77 at 80 px), which makes a true wave.
Holding a card back (CSS — rule to add) no lag .sb-stagger-card:nth-child(3) { animation-range: entry 30% entry 70% } starts it later than its neighbours. An animation-delay would have no effect here.
Distance (CSS — translateY(30px)) 30 px 12 px for a mere flicker; at 60 px the travel exceeds the card's own height and the rise becomes much more noticeable.
Density (CSS — .sb-stagger-content { gap: 12px }, .sb-stagger-card { padding: 16px }) 49 px cards every 61 px The pitch sets the rhythm: one card comes in every 61 px of scrolling. Tighten for a brisk list, loosen for a calmer read.
Stage length (CSS — padding on .sb-stagger-content) 40 px top and bottom; 434 px in all, 154 px of travel The height follows your cards. You need more of them than the area shows: only those starting below the bottom edge animate. More bottom padding lets the last one settle higher in the frame.
Driving area (CSS — .sdc-scroll-container { height: 280px; overflow-y: auto }) the 280 px box Without these two declarations the window acts as the area: cards enter from the bottom of the screen. In a window taller than the list, everything is in place from the start (tried).

FAQ

The mechanism is the same — one view() timeline per block, a rising fade on entry — and that should be said: with Fade Up, three values are enough to get this one. What changes is the tuning and the template: here one-line cards 49 px tall and 12 px apart, a 30 px travel done in 20 px of scrolling; there taller title + text blocks, 60 px of travel over half the entry. This one is ready for a dense list, the other for a few content blocks. Closer still, Fade In Reveal (fx-0556) plays exactly the same movement — 30 px over the first 40 percent of the entry — and differs only in the card it ships: title and sentence aligned left there, one centred line here.
There is none, and there cannot be one in that form. On a scroll-linked animation, animation-delay in milliseconds is ignored by browsers. The gap between two cards is a distance: 61 px, their pitch in the list. To change it, change the spacing; to make one particular card start later, shift its range (animation-range). And if you want two cards of the same row offset from each other, that is the job of Stagger Reveal CSS.
Because they are already in the area when the page opens: their entry is behind them and the animation, frozen on its last frame, shows them in place. Only cards whose top is below the bottom edge at the start play their rise — two out of six in the demo. That is intended: nothing flickers on opening, and the reader does not wait for content already in front of them.