A scroll-driven animation is tied to scroll position instead of time: scroll down and it plays forward, scroll up and it plays back.
CSS now supports it directly with animation-timeline: scroll() and view(), running off the main thread. Libraries like GSAP ScrollTrigger and Motion's scroll() do the same with more control.
It is different from an animation that simply starts when something scrolls into view; scroll-driven means the scroll bar is the playhead.
/* CSS */
.bar { animation: grow linear both; animation-timeline: scroll(); }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
See it live
Heat Stats (Tethered Bento): Numbers roll up as the section scrolls in and a glow rises inside each card with its value.
Home (Whisker): A 3D steel card drawer: fill in the card and your pet’s record rises out of its slot, printed with its year of care; then a rubber stamp marks the year as you scroll.
Drink (Crema): The photo eases away as you scroll to the beans in the hopper today, with origin and tasting notes, and size and milk picks that move the price.
Event (Wristband): A photo header that turns into the bar as you scroll, the line-up with set times, doors, age, the venue and friends going.
About (Sheen): Opening hours read in UK time say whether the studio is open right now; the studio photo drifts slowly as you scroll.
Album (Encore): The cover shrinks into the top bar as you scroll, the play button docks beside the title, the playing song shows live EQ bars and the whole page takes the cover colour.