gsap-scrolltrigger

Create scroll-driven animations and element pinning with GSAP ScrollTrigger.

Updated Dec 13, 2019
One-click install
npx skills add https://github.com/polaroidkidd/dle.dev --skill gsap-scrolltrigger-polaroidkidd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gsap-scrolltrigger
Source: https://github.com/polaroidkidd/dle.dev/tree/main/.agents/skills/gsap-scrolltrigger
Command: npx skills add https://github.com/polaroidkidd/dle.dev --skill gsap-scrolltrigger-polaroidkidd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers implement and reason about scroll-driven animations using GSAP ScrollTrigger, enabling trigger-based animation, pinning, and scrub interactions with minimal setup.

Core Features & Use Cases

  • Triggered animations on scroll with ScrollTrigger to tie progress to scroll position.
  • Pinning and parallax effects for sections and elements to enhance storytelling.
  • Batch and scrollerProxy support for complex layouts and integrations across different scroll containers.

Quick Start

Load GSAP and the ScrollTrigger plugin, then create a ScrollTrigger instance by specifying the trigger element, start and end positions, and the target animation to link to the scroll progress.

Frequently Asked Questions about gsap-scrolltrigger

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

FAQPage Schema
How do I create scroll-driven animations tied to scroll position?

Scroll-driven animations link element progress to scroll position using trigger elements, start and end positions, and scrub configurations. You specify a trigger element, define start/end points, and attach animations to respond directly to scroll progress.

What's the best way to pin sections for parallax effects on scroll?

Pinning sections for parallax effects uses ScrollTrigger's pin property to lock elements during a defined scroll range. This enables sticky sections and parallax storytelling by holding elements in place while the scroll progress advances through the specified end position.

How do I configure start and end positions for scroll triggers?

Configuring start and end positions for scroll triggers involves defining scroll-based coordinates relative to the trigger element and the viewport. These positions dictate exactly when the scroll animation begins and completes, allowing precise control over reveal and pinning behaviors.

Can I use scroll-based animations inside different scroll containers?

Scroll-based animations support complex layouts and integrations across different scroll containers using the containerAnimation and scrollerProxy features. This allows triggering and scrubbing animations within nested or custom scrolling areas rather than only the main window.

Why does my scroll trigger need refresh and cleanup semantics?

Refresh and cleanup semantics recalculate scroll positions after layout shifts and prevent memory leaks by removing inactive triggers. Proper cleanup ensures scroll animations remain accurate and performant when elements or containers change dynamically.

How do I batch triggered animations on scroll?

Batching triggered animations on scroll groups multiple elements to fire sequentially as they enter the viewport. This approach synchronizes scroll-based reveals across lists or grids, preventing performance issues from animating numerous elements simultaneously.