What problem does it solve?
Scroll-based user interfaces often require synchronizing animations with the page's scroll position. This skill provides a robust API to tie GSAP animations to scrolling, enabling parallax, pinning, scrubbing, and timeline-based interactions.
Core Features & Use Cases
- Trigger-based animations: tie tweens and timelines to scroll using a trigger, start, end, and options.
- Scrub and pin: sync animation progress with scroll movement and pin elements during active ranges.
- Batch and proxy: use ScrollTrigger.batch for grouped callbacks and ScrollTrigger.scrollerProxy for non-native scroll containers.
- Development & patterns: markers for debugging, horizontal scroll via containerAnimation, and timeline-driven scroll experiences.
- Best practices: refresh on layout changes, clean up in SPAs, and register plugins before use.
Quick Start
Attach a ScrollTrigger to a GSAP tween or timeline with a trigger, define start and end, and optionally enable scrub or pin to create a scroll-driven animation.