GSAP/gsap-scrolltrigger — Agent Skills | officialskills.sh
Back to skills

gsap-scrolltrigger

communitydevelopment

ScrollTrigger is a GSAP plugin that links animations to scroll position.

Setup & Installation

npx skills add https://github.com/greensock/gsap-skills --skill gsap-scrolltrigger
or paste the link and ask your coding assistant to install it
https://github.com/greensock/gsap-skills/tree/main/skills/gsap-scrolltrigger
View on GitHub

What This Skill Does

ScrollTrigger is a GSAP plugin that links animations to scroll position. It handles triggering tweens and timelines on scroll, pinning elements in place, scrubbing animation progress to scroll distance, and batching scroll-based callbacks for multiple elements.

ScrollTrigger handles pin spacing, scroll position math, refresh-on-resize, and cleanup automatically, removing the manual IntersectionObserver and scroll event bookkeeping that custom implementations require.

When to use it

  • Pinning a hero section while inner content animates on scroll
  • Scrubbing a timeline so animation progress tracks exact scroll distance
  • Triggering staggered card reveals as they enter the viewport
  • Building fake horizontal scroll sections with vertical scroll input
  • Syncing GSAP with third-party smooth-scroll libraries via scrollerProxy