gsap-react

Integrate GSAP animations in React with the useGSAP hook.

6|5|Updated May 7, 2026
One-click install
npx skills add https://github.com/wubq511/ProjectFlow --skill gsap-react-wubq511
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gsap-react
Source: https://github.com/wubq511/ProjectFlow/tree/main/SkillPack/gsap-react
Command: npx skills add https://github.com/wubq511/ProjectFlow --skill gsap-react-wubq511

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gsap, @gsap/react, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide on using GSAP for React animations, addressing the challenges of setting up, managing, and cleaning up animations in React applications.

Core Features & Use Cases

  • Animation Setup: Walks through setting up GSAP animations in React with the useGSAP hook.
  • Cleanup: Ensures proper cleanup of GSAP animations to avoid memory leaks.
  • Context: Explains how to use GSAP in a context-aware way to prevent SSR issues.
  • Use Case: Ideal for developers who need to add animations to their React or Next.js applications and want to leverage GSAP’s powerful features.

Quick Start

Install GSAP and the GSAP React package, then use the useGSAP hook to animate any element in your React component.

Frequently Asked Questions about gsap-react

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

FAQPage Schema
How do I set up GSAP animations in a React application?

To set up GSAP animations in a React application, install the gsap and @gsap/react packages, then use the useGSAP hook to animate elements within your components. This ensures proper integration and context management.

Why do my GSAP animations cause memory leaks in React?

GSAP animations cause memory leaks in React if not properly cleaned up. Using the useGSAP hook from the @gsap/react package handles animation cleanup automatically, preventing leaks when components unmount.

Can I use GSAP with Next.js and server-side rendering?

Yes, you can use GSAP with Next.js and server-side rendering. The Skill provides instructions for context-aware GSAP usage to prevent SSR issues and ensure animations run correctly on the client side.

Do I need to install specific packages to use GSAP with React?

Yes, you need to install the gsap and @gsap/react packages. The @gsap/react package provides the useGSAP hook, which is required for proper animation setup, context management, and cleanup in React components.

What is the best way to manage animation context when using GSAP in React?

The best way to manage animation context when using GSAP in React is through the useGSAP hook. It handles context scoping automatically, ensuring animations only affect the intended elements and preventing SSR conflicts.