What problem does it solve?
This Skill addresses common pitfalls AI agents encounter when implementing scroll-based animations, particularly with GSAP, React, and Lenis, preventing silent bugs like memory leaks and incorrect scroll positioning.
Core Features & Use Cases
- React Cleanup: Ensures proper GSAP animation cleanup within React components using
useGSAP.
- Lenis Integration: Correctly integrates Lenis smooth scrolling with GSAP ScrollTrigger to avoid scroll position errors.
- Horizontal Scroll: Provides guidance for implementing horizontal scrolling effects with pinning and scrubbing.
- Sequential Animations: Demonstrates how to animate the same property sequentially without caching issues, using
fromTo or timelines.
- CSS Alternatives: Highlights when to use CSS Scroll-Driven Animations for simpler effects.
Quick Start
Use the scrolling-with-purpose skill to implement GSAP animations with Lenis integration in a React component.