gsap-react

Installation
Summary

GSAP integration for React with lifecycle-aware hooks, ref patterns, and automatic cleanup.

  • useGSAP hook handles component lifecycle, scoped selectors, dependency tracking, and automatic animation cleanup on unmount
  • Supports single and multiple element refs, dynamic lists, and timeline management with play/pause/restart controls
  • contextSafe wrapper for event handlers ensures animations respect React's context and prevent memory leaks
  • Includes ScrollTrigger integration, custom animation hooks (useFadeIn, useHoverAnimation), and performance patterns like batching and will-change optimization
SKILL.md

GSAP React Integration

React-specific patterns for GSAP animations.

Quick Start

npm install gsap @gsap/react
import { useGSAP } from '@gsap/react';
import gsap from 'gsap';

function Component() {
  const containerRef = useRef(null);
Related skills

More from bbeierle12/skill-mcp-claude

Installs
606
GitHub Stars
8
First Seen
Jan 22, 2026