gsap-scrolltrigger

Create GSAP animations and scroll-driven experiences with ScrollTrigger for web projects.

Updated Jun 30, 2026
One-click install
npx skills add https://github.com/ayofemiade/cleva --skill gsap-scrolltrigger-ayofemiade
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gsap-scrolltrigger
Source: https://github.com/ayofemiade/cleva/tree/main/.claude/skills/gsap-scrolltrigger
Command: npx skills add https://github.com/ayofemiade/cleva --skill gsap-scrolltrigger-ayofemiade

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Building smooth, scroll-driven web animations with GSAP and ScrollTrigger involves complex timing, pinning, scrubbing, and sequencing logic that is easy to get wrong, leading to janky or broken animation behavior. ## Core Features & Use Cases - Animation Patterns: Provides copy-paste patterns for tweens, timelines, pinning, scrubbing, parallax, horizontal scrolling, and staggered animations. - Framework Integration: Includes integration examples for React (useGSAP hook), Three.js/WebGL, and Locomotive Scroll. - Code Generation Scripts: Ships Python scripts to generate GSAP boilerplate and interactively build timeline sequences. - Use Case: When building a scrollytelling landing page, use this Skill to generate a pinned horizontal-scroll section with scrubbed timeline animations and proper cleanup in a React component. ## Quick Start Use the gsap-scrolltrigger skill to create a pinned scroll-driven animation that fades in each section of my page as the user scrolls.

Frequently Asked Questions about gsap-scrolltrigger

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a scroll-triggered animation with GSAP ScrollTrigger?▼

Register the ScrollTrigger plugin, then add a scrollTrigger config object to a gsap.to or gsap.from call with trigger, start, end, and scrub properties. The animation then plays or scrubs based on the element's position relative to the viewport.

How to pin an element while scrolling with GSAP?▼

Use ScrollTrigger.create with pin: true, a trigger element, a start position like "top top", and an end value such as "+=500" to pin for 500 pixels of scrolling. Set pinSpacing to control whether extra space is added.

Does GSAP ScrollTrigger work with React?▼

Yes, GSAP works with React through the useGSAP hook from @gsap/react, which handles scoping and cleanup. Register ScrollTrigger, create animations inside useGSAP with a container ref scope, and tweens are reverted automatically on unmount.

Why do multiple GSAP tweens on the same element conflict?▼

Two tweens targeting the same property on one element cause jumps because the second overwrites the first. Fix it with fromTo, immediateRender: false, or by placing both tweens in a single timeline with one ScrollTrigger.

What easing should I use for GSAP scroll animations?▼

Use ease: "none" for scrubbed scroll-driven animations so the user controls the speed. For standard UI animations, power2.out is the default choice, while back.out(1.7) suits playful entrances.

Can GSAP animate Three.js or WebGL objects on scroll?▼

Yes, GSAP can tween Three.js camera positions, mesh rotations, and material properties by targeting their numeric properties directly. Attach a ScrollTrigger with scrub to link the 3D animation to scroll position.