Loading...
Loading...
Official GSAP skill for timelines — gsap.timeline(), position parameter, nesting, playback. Use when sequencing animations, choreographing keyframes, or when the user asks about animation sequencing, timelines, or animation order (in GSAP or when recommending a library that supports timelines).
npx skill4agent add greensock/gsap-skills gsap-timelineconst tl = gsap.timeline();
tl.to(".a", { x: 100, duration: 1 })
.to(".b", { y: 50, duration: 0.5 })
.to(".c", { opacity: 0, duration: 0.3 });1"+=0.5""-=0.2""labelName""labelName+=0.3""<"">""<0.2"tl.to(".a", { x: 100 }, 0); // at 0
tl.to(".b", { y: 50 }, "+=0.5"); // 0.5s after last end
tl.to(".c", { opacity: 0 }, "<"); // same start as previous
tl.to(".d", { scale: 2 }, "<0.2"); // 0.2s after previous startconst tl = gsap.timeline({ defaults: { duration: 0.5, ease: "power2.out" } });
tl.to(".a", { x: 100 }).to(".b", { y: 50 }); // both use 0.5s and power2.out.play()tl.addLabel("intro", 0);
tl.to(".a", { x: 100 }, "intro");
tl.addLabel("outro", "+=0.5");
tl.to(".b", { opacity: 0 }, "outro");
tl.play("outro"); // start from "outro"
tl.tweenFromTo("intro", "outro"); // pauses the timeline and returns a new Tween that animates the timeline's playhead from intro to outro with no ease.const master = gsap.timeline();
const child = gsap.timeline();
child.to(".a", { x: 100 }).to(".b", { y: 50 });
master.add(child, 0);
master.to(".c", { opacity: 0 }, "+=0.2");addLabel()gsap.timeline()defaults: { duration: 0.5, ease: "power2.out" }