Loading...
Loading...
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.
npx skill4agent add mengto/skills gsapgsap.to(targets, vars)gsap.from(targets, vars)gsap.fromTo(targets, fromVars, toVars)const tl = gsap.timeline({ defaults, repeat, yoyo, paused })tl.to(...).from(...).addLabel('x').add(() => ...)1.2"+=0.5""-=0.3""intro"ease: "power2.out""expo.inOut""elastic.out(1, 0.3)"stagger: 0.05{ each, from: "start|center|end|random", grid }xyscalerotationautoAlphagsap.registerPlugin(ScrollTrigger)gsap.to(".box", { scrollTrigger: ".box", x: 500 })scrollTrigger: { trigger, start, end, scrub, pin, snap, markers }ScrollTrigger.create({ trigger, start, end, onUpdate, onToggle })will-change: transformgsap.context()ScrollTrigger.getAll().forEach(t => t.kill())ScrollTrigger.refresh()gsap.from(".hero [data-anim]", {
y: 24,
autoAlpha: 0,
duration: 0.8,
ease: "power2.out",
stagger: 0.06,
});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");gsap.registerPlugin(ScrollTrigger);
gsap.timeline({
scrollTrigger: {
trigger: ".story",
start: "top top",
end: "+=800",
scrub: 1,
pin: true,
},
}).to(".story .panel", { xPercent: -200 });