
Gsap React
React-specific GSAP patterns covering the useGSAP hook, ref handling, scoped context, and cleanup on unmount.
- skills.sh installs
- 728
- GitHub stars
- 9
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers the useGSAP hook with scope and dependencies, contextSafe for event handlers, and single, multiple, and dynamic ref patterns
- Includes manual gsap.context usage with ctx.revert cleanup, timeline ref control, and ScrollTrigger setup inside React components
- Enforces automatic animation cleanup on unmount and scoped selector queries so animations stay inside the component container
- Designed for React developers implementing GSAP animations, component lifecycle handling, or reusable animation hooks
Install
$ npx -y skills add bbeierle12/skill-mcp-claude --skill gsap-react -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
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);
useGSAP(() => {
gsap.to('.box', { x: 200, duration: 1 });
}, { scope: containerRef });
return (
<div ref={containerRef}>
<div className="box">Animated</div>
</div>
);
}
useGSAP Hook
Basic Usage
import { useGSAP } from '@gsap/react';
import gsap from 'gsap';
function AnimatedComponent() {
const container = useRef(null);
useGSAP(() => {
// All GSAP animations here
gsap.from('.item', {
opacity: 0,
y: 50,
stagger: 0.1
});
}, { scope: container }); // Scope limits selector queries
return (
<div ref={container}>
<div className="item">Item 1</div>
<div className="item">Item 2</div>
<div className="item">Item 3</div>
</div>
);
}
With Dependencies
function AnimatedComponent({ isOpen }) {
const container = useRef(null);
Details
- Repository
- github.com/bbeierle12/skill-mcp-claude
- Categories
- Animation & Motion, Frontend & UI Code
More from bbeierle12/skill-mcp-claude
All 3Similar to Gsap React
More Animation & Motion
gsap-frameworksgreensock/gsap-skills75K installsLifecycle-safe GSAP patterns for Vue, Nuxt, and Svelte, scoped with gsap.context and reverted on unmount.
gsapmindrally/skills811 installsExpert GSAP animation guidelines covering performance, timelines, ScrollTrigger, and React cleanup.
motion-reactpedronauck/skills1.2K installsMotion for React skill covering gestures, scroll effects, springs, layout, and exit animations in React apps.
react-spring-physicsfreshtechbro/claudedesignskills2.7K installsPhysics-based animation library pairing React Spring hooks with Popmotion utilities for interruptible, gesture-driven motion.
gsap-framer-scroll-animationgithub/awesome-copilot4.1K installsScroll-driven motion toolkit covering GSAP ScrollTrigger and Framer Motion, with Copilot prompts and recipes.
gsap-scrolltriggerfreshtechbro/claudedesignskills3.2K installsComprehensive GSAP and ScrollTrigger guide for tweens, timelines, scroll-linked animation, and pinning.