GSAP Best Practices
Rule routing
Load the smallest relevant set:
- Read
AGENTS.mdfor broad GSAP reviews, unclear tasks, or when you need the compact checklist. - Read
rules/gsap-core.mdfor tweens, eases, staggers, transform aliases,matchMedia, defaults, orimmediateRender. - Read
rules/gsap-timelines.mdfor sequencing, labels, position parameters, nested timelines, or playback control. - Read
rules/gsap-scrolltrigger.mdfor scroll animation, ScrollTrigger, pinning, scrub, snap, batch, scroller proxies, refresh, or horizontal scroll. - Read
rules/gsap-plugins.mdfor plugin registration or plugin APIs such as Flip, Draggable, Observer, SplitText, ScrambleText, DrawSVG, MorphSVG, MotionPath, ScrollTo, ScrollSmoother, or GSDevTools. - Read
rules/gsap-utils.mdforgsap.utils, value mapping,clamp,mapRange,normalize,random,snap,distribute,toArray,selector,pipe,wrap, or units. - Read
rules/gsap-performance.mdfor jank, FPS, layout thrashing, many elements,quickTo,quickSetter,will-change, reduced motion, or animation cleanup/performance.
For React or Next.js, load the smallest matching React rules:
rules/react-gsap-setup.mdfor package setup anduseGSAP.rules/react-gsap-lifecycle.mdfor cleanup andcontextSafe.rules/react-gsap-dependency-bugs.mdfor dependency-driven updates.rules/react-gsap-scrolltrigger.mdfor React ScrollTrigger integration.rules/react-gsap-ssr-strictmode.mdfor SSR and Strict Mode.
Read REACT.md only for a broad React GSAP review.
Use strict language only for correctness, stability, and accessibility. Prefer official GSAP docs when resolving conflicts.
微信扫一扫