gsap-scrolltrigger

Implement scroll-linked animations, pinning, scrubbing, and triggers with GSAP's ScrollTrigger plugin.

8|3|Updated Jun 7, 2026
One-click install
npx skills add https://github.com/magicpro97/vibeflow --skill gsap-scrolltrigger-magicpro97
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gsap-scrolltrigger
Source: https://github.com/magicpro97/vibeflow/tree/main/.agents/skills/gsap-scrolltrigger
Command: npx skills add https://github.com/magicpro97/vibeflow --skill gsap-scrolltrigger-magicpro97

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gsap, and includes scripts (resource) components.

What problem does it solve?

This Skill helps users implement scroll-linked animations, pinning, scrubbing, and triggers using GSAP's ScrollTrigger, simplifying the creation of interactive web elements.

Core Features & Use Cases

  • Scroll-Linked Animations: Trigger tweens or timelines based on scroll position.
  • Pinning Elements: Keep elements in place while scrolling.
  • Scrubbing Animations: Navigate through animations by scrolling.
  • Use Case: Use this Skill to create a website with interactive elements that respond to scroll actions, such as animations that play as the user scrolls down a page.

Quick Start

To create a simple scroll-linked animation, use the following code snippet within your JavaScript:

gsap.to(".box", {
  x: 500,
  duration: 1,
  scrollTrigger: {
    trigger: ".box",
    start: "top center",
    end: "bottom center",
    toggleActions: "play reverse play reverse"
  }
});

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-linked animations on my website?

Scroll-linked animations trigger tweens or timelines based on the user's scroll position. You can create them by configuring trigger, start, and end points to play animations as the page scrolls.

What is scrubbing in scroll-based animation?

Scrubbing in scroll-based animation attaches animation progress directly to the scrollbar position. This allows users to navigate forward and backward through an animation sequence by scrolling up and down the page.

Do I need the GSAP library loaded to use ScrollTrigger?

Yes, you must load the GSAP library to use ScrollTrigger. This plugin implements scroll-based triggers, pinning, and scrubbing by extending GSAP's core animation functionality.

Can I pin elements in place while scrolling down a page?

Yes, you can pin elements to keep them fixed in the viewport while the user continues scrolling. This is useful for creating interactive sections where text or graphics stay visible during an animation sequence.

What's the best way to trigger tween animations based on scroll position?

The best way to trigger tween animations based on scroll position is using GSAP's ScrollTrigger plugin. You define a trigger element, start and end positions, and toggle actions to play or reverse animations on scroll.

Why use GSAP ScrollTrigger for interactive web elements?

GSAP ScrollTrigger simplifies the creation of interactive web elements by handling scroll-linked animations, pinning, and scrubbing. It provides a structured API to trigger tweens and timelines based on scroll actions.