gsap-scrolltrigger

Implements scroll-linked animations, pinning, and scrubbing with the GSAP ScrollTrigger plugin.

1|Updated Aug 17, 2026
One-click install
npx skills add https://github.com/Marshal-Nguyen/Skill_Claude_Agent --skill gsap-scrolltrigger-marshal-nguyen
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gsap-scrolltrigger
Source: https://github.com/Marshal-Nguyen/Skill_Claude_Agent/tree/main/claude/skills/gsap-scrolltrigger
Command: npx skills add https://github.com/Marshal-Nguyen/Skill_Claude_Agent --skill gsap-scrolltrigger-marshal-nguyen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building scroll-driven animations by hand requires manual scroll event handling, position math, and cleanup logic that is error-prone and hard to maintain. This Skill provides the correct GSAP ScrollTrigger patterns for triggering, pinning, and scrubbing animations tied to scroll position. ## Core Features & Use Cases - Scroll-Linked Animations: Trigger tweens and timelines at precise scroll positions using start/end, toggleActions, and scrub configurations. - Pinning and Horizontal Scroll: Pin sections during scroll and build fake horizontal scroll experiences with containerAnimation. - Batching and Custom Scrollers: Coordinate staggered reveals with ScrollTrigger.batch() and integrate third-party smooth-scroll libraries via scrollerProxy(). - Use Case: A developer building a landing page wants a section pinned while its content animates horizontally as the user scrolls vertically, with elements fading in as they enter the viewport. ## Quick Start Use the gsap-scrolltrigger skill to pin a section and scrub a horizontal scroll animation through its content.

Frequently Asked Questions about gsap-scrolltrigger

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

FAQPage Schema
How do I trigger a GSAP animation on scroll?▼

Register the ScrollTrigger plugin with gsap.registerPlugin(ScrollTrigger), then add a scrollTrigger config object to your tween or timeline with trigger, start, and end properties. Use toggleActions for play/reverse behavior or scrub to link progress directly to scroll position.

How to pin a section while scrolling with ScrollTrigger?▼

Set pin: true in the scrollTrigger config and define an end value like "+=1000" to control pin duration. Animate children of the pinned element rather than the pinned element itself, and leave pinSpacing at its default true so layout does not collapse.

Can I use ScrollTrigger with React?▼

Yes, use the useGSAP() hook from the @gsap/react package to automatically revert and clean up ScrollTriggers when components unmount. Alternatively, manually kill instances in a useEffect cleanup with ScrollTrigger.getAll().forEach(t => t.kill()).

Why is my horizontal scroll animation out of sync with vertical scroll?▼

The horizontal tween used with containerAnimation must have ease: "none" so scroll position maps 1:1 to horizontal position. Any other easing breaks the synchronization between vertical scroll and horizontal movement.

Should I use scrub or toggleActions in ScrollTrigger?▼

Use scrub when animation progress should follow scroll position continuously, and toggleActions for discrete play/reverse behavior at trigger boundaries. Never combine both on the same ScrollTrigger; if both exist, scrub wins.