gsap-react

Implement GSAP animations in React components with the useGSAP hook.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the complexities of implementing GSAP animations in React applications, simplifying the process of creating and managing animations within React components.

Core Features & Use Cases

  • Animation Hook: Provides the useGSAP() hook for clean, scoped animations within React components.
  • Ref Handling: Facilitates targeted GSAP animations by using React refs.
  • Cleanup Automation: Ensures proper cleanup of animations to avoid memory leaks.
  • Use Case: Ideal for a developer who needs to add animations to a React component and requires best practices for GSAP integration.

Quick Start

To animate an element within your React component using GSAP, simply use the useGSAP hook.

Frequently Asked Questions about gsap-react

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

FAQPage Schema
How do I use GSAP animations in React components?

You can implement GSAP animations in React components by using the useGSAP hook to manage animations and React refs to target elements, ensuring animations are properly scoped and cleaned up.

Does GSAP work with server-side rendering in React?

Yes, GSAP works with server-side rendering in React. This integration supports both client-side and server-side rendering scenarios, ensuring animations are correctly scoped and cleaned up across environments.

What is the best way to prevent GSAP memory leaks in React?

The best way to prevent GSAP memory leaks in React is using the useGSAP hook, which provides cleanup automation to ensure animations are properly disposed of when components unmount.

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

Yes, you need the @gsap/react package to integrate GSAP animations into React. It provides the useGSAP hook and ref handling required for clean, scoped animations within your components.

Why are my GSAP animations not applying to React elements?

GSAP animations may not apply if React refs are not properly targeting elements. Using the useGSAP hook with correct ref handling facilitates targeted animations and ensures proper scoping within components.