gsap-setup

Configure GSAP installation, plugin registration, and animation defaults in JavaScript projects.

52|3|Updated Aug 20, 2026
One-click install
npx skills add https://github.com/Wayn-Git/Amethyst --skill gsap-setup-wayn-git
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gsap-setup
Source: https://github.com/Wayn-Git/Amethyst/tree/main/agents/skills/gsap-setup
Command: npx skills add https://github.com/Wayn-Git/Amethyst --skill gsap-setup-wayn-git

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gsap, @gsap/react.

What problem does it solve? Setting up GSAP correctly involves scattered decisions about installation methods, plugin registration, global defaults, and cleanup, and mistakes like unregistered plugins or memory leaks cause broken animations and poor performance. ## Core Features & Use Cases - Installation & Plugin Registration: Covers npm, CDN, and ES module setups, plus registering core and formerly members-only plugins like ScrollTrigger, Draggable, Flip, and SplitText. - Global Configuration: Centralizes defaults, ScrollTrigger config, custom eases, and environment-specific settings for development versus production. - Best Practices & Troubleshooting: Documents common mistakes such as conflicting tweens, missing cleanup, and unscoped selectors, with a performance checklist. - Use Case: When starting a React project that needs scroll-driven animations, use this Skill to install gsap and @gsap/react, register ScrollTrigger once, set global defaults, and wire up useGSAP with proper cleanup. ## Quick Start Set up GSAP with ScrollTrigger in my React project, including plugin registration, global defaults, and a configured gsap module.

Frequently Asked Questions about gsap-setup

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

FAQPage Schema
How do I install and set up GSAP in a project?▼

Install GSAP with npm install gsap, or load it via CDN script tags from jsdelivr. For React, also install @gsap/react, then create a central gsap.js module that registers plugins and sets global defaults.

How do I register GSAP plugins like ScrollTrigger?▼

Import the plugin from its path, such as gsap/ScrollTrigger, then call gsap.registerPlugin(ScrollTrigger) once at your app entry point. Registering all plugins in one place avoids redundant registration across files.

Does GSAP work with React hooks?▼

Yes, the @gsap/react package provides the useGSAP hook, which you register alongside other plugins. It scopes selectors to a component and automatically cleans up animations on unmount, preventing memory leaks.

Why is my GSAP ScrollTrigger animation not working?▼

The most common cause is forgetting to call gsap.registerPlugin(ScrollTrigger) before using scrollTrigger properties in a tween. Also verify the trigger element exists in the DOM and refresh ScrollTrigger after dynamic DOM changes.

How do I prevent GSAP animations from causing memory leaks?▼

Use the useGSAP hook in React, which cleans up automatically, or manually call kill() and killTweensOf() when components unmount. Never create tweens in useEffect without a cleanup function.

Are GSAP bonus plugins like SplitText free to use?▼

Since GSAP 3.13, formerly members-only plugins such as SplitText, MorphSVGPlugin, and DrawSVGPlugin ship in the public gsap npm package. Follow the standard license terms published on the GSAP site.