
GSAP
SkillHelps the agent add or debug web animations with GSAP: tweens, timelines and position parameters, easing, stagger and ScrollTrigger pin and scrub, plus fixes for jank, cleanup with gsap.context() in React and refreshing after images load.
name: gsap
description: Use when you need to add or debug professional web animations with GSAP (timelines, ScrollTrigger, stagger, transforms) in HTML/CSS/JS/React. Includes patterns for smooth motion, performance, and common pitfalls.
GSAP (GreenSock) — Web Animation Skill
When to use
- High-quality UI/motion design: entrances, micro-interactions, page transitions
- Timeline-based sequences (vs. scattered CSS transitions)
- Scroll-driven storytelling (with ScrollTrigger)
- Complex easing, staggering, orchestration across many elements
Key concepts & APIs
- Tweens:
gsap.to(targets, vars)gsap.from(targets, vars)gsap.fromTo(targets, fromVars, toVars)
- Timelines:
const tl = gsap.timeline({ defaults, repeat, yoyo, paused })- Chain:
tl.to(...).from(...).addLabel('x').add(() => ...) - Position parameter: absolute
1.2, relative"+=0.5", overlap"-=0.3", label"intro"
- Eases:
ease: "power2.out","expo.inOut","elastic.out(1, 0.3)" - Staggers:
stagger: 0.05or{ each, from: "start|center|end|random", grid } - Performance-friendly properties:
- Prefer transforms (
x,y,scale,rotation) and opacity (autoAlpha)
- Prefer transforms (
- ScrollTrigger (plugin):
gsap.registerPlugin(ScrollTrigger)- Inline:
gsap.to(".box", { scrollTrigger: ".box", x: 500 }) - Advanced:
scrollTrigger: { trigger, start, end, scrub, pin, snap, markers } - Standalone:
ScrollTrigger.create({ trigger, start, end, onUpdate, onToggle })
Common pitfalls (and fixes)
- Animating layout properties (top/left/width/height) → jank
- Use transforms, add
will-change: transform, avoid forced reflow.
- Use transforms, add
- ScrollTrigger “not firing” due to wrong trigger sizing/overflow containers
- Ensure trigger exists, has height, and check scroll container (nested scrolling needs config).
- Not cleaning up in SPA/React
- Use
gsap.context()and revert on unmount; kill triggers (ScrollTrigger.getAll().forEach(t => t.kill())) if needed.
- Use
- FOUC / measuring before fonts/images load
- Initialize after layout is stable; run
ScrollTrigger.refresh()after images load.
- Initialize after layout is stable; run
Quick recipes
1) Hero entrance (stagger)
gsap.from(".hero [data-anim]", {
y: 24,
autoAlpha: 0,
duration: 0.8,
ease: "power2.out",
stagger: 0.06,
});
2) Sequenced timeline
const tl = gsap.timeline({ defaults: { ease: "power2.out", duration: 0.6 } });
tl.from(".nav", { y: -20, autoAlpha: 0 })
.from(".hero-title", { y: 30, autoAlpha: 0 }, "-=0.2")
.from(".hero-cta", { scale: 0.95, autoAlpha: 0 }, "-=0.2");
3) Scroll-scrub pinned section
gsap.registerPlugin(ScrollTrigger);
gsap.timeline({
scrollTrigger: {
trigger: ".story",
start: "top top",
end: "+=800",
scrub: 1,
pin: true,
},
}).to(".story .panel", { xPercent: -200 });
What to ask the user (if requirements unclear)
- Is this a static site or SPA (React/Next/Vue)? Any page transitions?
- Do we need scroll-driven sections (pin/scrub/snap)?
- Performance constraints (mobile support, reduced motion)?
관련 리소스

GSAP AI Skills
SkillGSAP's official animation skills: teach agents to use the core API, timelines, ScrollTrigger and plugins correctly, including React, Vue and Svelte integration and animation performance. Maintained by GreenSock; all plugins are free.
greensock/gsap-skills16.5k
Cobe.js
SkillAdds a lightweight interactive WebGL globe with the cobe library: canvas sizing for device pixel ratio, location markers, rotation in onRender, resize handling and teardown, for plain pages or React/Next.js hero sections.
MengTo/Skills6.8k
GSAP ScrollTrigger Storytelling
SkillBuilds cinematic, scroll-driven product storytelling with GSAP ScrollTrigger: pinned scenes, scrubbed timelines, progressive UI reveals and section handoffs, with cleanup in React, simpler choreography on small screens and readable copy and CTAs.
MengTo/Skills6.8k
Masked Reveal
SkillReveals headings and short copy word by word through an overflow mask as they scroll into view, using GSAP ScrollTrigger and a split helper that avoids the paid SplitText plugin, with aria-label, reduced-motion support and React cleanup.
MengTo/Skills6.8k
Lottie Animation
SkillIntegrates Lottie and dotLottie animations from After Effects into web, iOS, Android and React Native: playback and segment control, scroll- or hover-driven interactivity, runtime theming and recoloring, plus an After Effects export checklist.
iart-ai/web-animation-skills43
WebGL Components
SkillGuides building small always-on WebGL visuals (avatars, ambient orbs, glass and iridescent surfaces) inside product UI: one shared context, a single capped frame loop, cheap fragment shaders, context-loss handling, a mandatory non-WebGL fallback, and React SSR and Server Components pitfalls.
flornkm/skills114