gsap-react

Integrate GSAP animations into React components using the useGSAP hook with automatic cleanup and scoping.

Updated Feb 17, 2026
One-click install
npx skills add https://github.com/Microck/gsap-skills --skill gsap-react
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gsap-react
Source: https://github.com/Microck/gsap-skills/tree/main/skills/gsap-react
Command: npx skills add https://github.com/Microck/gsap-skills --skill gsap-react

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill simplifies the integration of GSAP animations within React applications, managing complex animation lifecycles and ensuring efficient cleanup.

Core Features & Use Cases

  • useGSAP Hook: Declaratively manage GSAP animations within React functional components.
  • Automatic Cleanup: Handles GSAP animation cleanup on component unmount, preventing memory leaks.
  • Scoped Animations: Easily scope animations to specific DOM elements within a React component.
  • Use Case: Animate the entrance of a list of items as they appear on screen, ensuring smooth transitions and proper resource management when the component unmounts.

Quick Start

Use the gsap-react skill to animate a div with the class 'box' to move 200 pixels to the right within its container.

Frequently Asked Questions about gsap-react

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

FAQPage Schema
How do I animate React components with GSAP without causing memory leaks?

You can animate React components with GSAP without memory leaks by using the `useGSAP` hook, which automatically handles animation cleanup and scoping on component unmount.

How does the useGSAP hook manage animation lifecycles in functional components?

The `useGSAP` hook manages animation lifecycles by declaratively controlling GSAP animations within React functional components and ensuring automatic cleanup when the component unmounts.

Can I use GSAP ScrollTrigger with React functional components?

Yes, you can use GSAP ScrollTrigger with React functional components. This integration supports ScrollTrigger and responsive design patterns for declarative animation control.

What is the best way to scope GSAP animations to specific DOM elements in React?

The best way to scope GSAP animations to specific DOM elements in React is by using the `useGSAP` hook from the `@gsap/react` package, which facilitates scoped animations within functional components.

Do I need the @gsap/react package to animate list item entrances in React?

You need the `@gsap/react` package to declaratively manage list item entrance animations in React, ensuring smooth transitions and proper resource cleanup when the component unmounts.