gsap-react

Integrate GSAP animations with React using setup, cleanup, and context handling guidelines.

Updated Jun 4, 2026
One-click install
npx skills add https://github.com/R1ve3raaTech/AlumniUCR --skill gsap-react-r1ve3raatech
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gsap-react
Source: https://github.com/R1ve3raaTech/AlumniUCR/tree/main/Skill%20GSAP/gsap-skills/skills/gsap-react
Command: npx skills add https://github.com/R1ve3raaTech/AlumniUCR --skill gsap-react-r1ve3raatech

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill unit provides guidelines and best practices for analyzing and optimizing GSAP animations within React applications, helping developers to implement and manage animations effectively.

Core Features & Use Cases

  • GSAP Integration: Integrates GSAP (GreenSock Animation Platform) with React to facilitate smooth animations.
  • Best Practices: Offers guidelines on GSAP setup, cleanup, and context handling to ensure efficient and error-free animations.
  • Use Case: A developer can use this skill to optimize an animation on a React-based website, improving user experience with dynamic and engaging content.

Quick Start

Use the gsap-react skill to set up an animation on the element with the ref 'myElementRef'.

Frequently Asked Questions about gsap-react

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

FAQPage Schema
How do I integrate GSAP animations in React without causing memory leaks?

GSAP animations in React require proper setup and cleanup using context handling to prevent memory leaks. This Skill provides guidelines for managing animation contexts efficiently and ensuring error-free execution.

What's the best way to set up GSAP context handling for a React element?

Setting up GSAP context handling involves using the @gsap/react package to scope animations to specific React element refs. This ensures animations are properly cleaned up when components unmount.

Can I use GSAP with Next.js and React-based frameworks?

Yes, GSAP integrates with Next.js and other React-based frameworks. This Skill targets React environments, providing specific setup and cleanup guidelines for frameworks using React.

Do I need both gsap and @gsap/react packages to animate elements in React?

Yes, integrating GSAP animations in React requires both the gsap and @gsap/react packages. The @gsap/react package provides the context handling necessary for proper React integration.

Why does my GSAP animation break when the React component re-renders?

GSAP animations break on React re-renders due to improper context handling and missing cleanup. Following GSAP setup guidelines ensures animations persist correctly across component lifecycle updates.

How do I optimize an existing GSAP animation on a React website?

Optimizing a GSAP animation in React involves analyzing current setup and applying context handling best practices. This Skill offers guidelines to improve animation efficiency and user experience.