Card cascade reveal on scroll
Reveal-on-scroll is the most common scroll effect on the web and usually arrives via data attributes sprinkled through the markup, which couples your animation config to your HTML and gives you nothing typed to refactor against. One scrollReveal call on a selector replaces the lot. Worth being straight: AOS (6.7 KB) and ScrollReveal (5.6 KB) are fine at this, and our reveal entry (6.1 KB) is about their size — the case for switching is types, tree-shaking and not touching your markup, not bytes.
The code
The “What’s new in Folio 4” page for a fictional notes app: six feature cards fade up in a stagger, the sync story slides in from the right and the release notes reveal row by row as you scroll.
import { scrollReveal } from 'svg-scroll-draw/reveal';
// Six feature cards fade up one after another, then stay
scrollReveal('.feature-card', {
preset: 'fadeUp',
stagger: 0.2, // each card starts a fifth of the way into the last one's reveal
once: true,
});
// The sync timeline slides in from the right
scrollReveal('.sync-step', { preset: 'fadeLeft', stagger: 0.2, once: true });
// Each changelog row reveals on the same window as it scrolls in
scrollReveal('.release-note', {
preset: 'fadeUp',
once: true,
trigger: { start: 'top 96%', end: 'top 78%' },
});
A notes app’s “What’s new” page
Folio
Related examples
Make your own in the scroll reveal generator: set it up, watch it run, copy the code.
MIT licensed, zero runtime dependencies. Every API is a separate entry point, so you only ship what you import. Full API reference →