gsap-scroll-trigger
Installation
SKILL.md
ScrollTrigger
Scroll-linked motion: required config, scrub, pin, toggleActions, snap, markers, batching, responsive matchMedia, refresh, and cleanup.
ScrollTrigger ties any tween or timeline to the scroll position. Register it once, then attach a scrollTrigger config to a tween or create a standalone ScrollTrigger.create().
import gsap from 'gsap'
import { ScrollTrigger } from 'gsap/ScrollTrigger'
import { useGSAP } from '@gsap/react'
gsap.registerPlugin(useGSAP, ScrollTrigger)
Always Define trigger, start, end
Never rely on defaults for these three. Being explicit makes the trigger predictable and readable at a glance.