
Gsap Timeline
Sequence and choreograph multi-step web animations with GSAP timelines instead of chaining unrelated single tweens.
Overview
gsap-timeline is an agent skill for the Build phase that teaches GSAP timeline sequencing, position parameters, nesting, and playback for multi-step UI motion.
Install
npx skills add https://github.com/nexu-io/open-design --skill gsap-timelineWhat is this skill?
- Documents gsap.timeline() with default append sequencing and chained .to() steps
- Explains absolute, relative, and label-based position parameters for parallel and staggered tweens
- Covers nesting child timelines and playback control (pause, resume, reverse, timeScale)
- Points to gsap-core, gsap-scrolltrigger, and gsap-react for adjacent GSAP workflows
- Curated from GreenSock’s official gsap-skills upstream (MIT)
- Upstream curated from GreenSock official gsap-skills repository (MIT)
Adoption & trust: 785 installs on skills.sh; 61.4k GitHub stars.
What problem does it solve?
You need several DOM or SVG elements to animate in a reliable order with overlaps and pauses, but one-off tweens and timers become impossible to maintain.
Who is it for?
Indie builders shipping marketing sites, product demos, or dashboard micro-interactions that need GSAP-grade sequencing beyond CSS keyframes alone.
Skip if: Teams that only need a single-property tween with no ordering—use gsap-core instead, or skip GSAP entirely for trivial CSS transitions.
When should I use this skill?
User mentions gsap timeline, animation timeline, sequenced animation, motion choreography, or needs multi-step GSAP ordering.
What do I get? / Deliverables
You get a gsap.timeline() plan with explicit placement and playback hooks so animations stay editable and can hand off to gsap-scrolltrigger or gsap-react when the scene is scroll- or React-driven.
- Timeline construction with position-parameter placement
- Nested timeline or playback control pattern
- Pointers to gsap-core / scroll / React companion skills
Recommended Skills
Journey fit
Timeline APIs land in the implementation layer when solo builders ship polished UI motion in marketing sites, dashboards, or product chrome. Frontend build work is where gsap.timeline(), position parameters, and nested playback are wired into components and pages.
How it compares
Procedural GSAP timeline knowledge for agents—not a runtime npm installer and not a scroll plugin; use gsap-scrolltrigger when the driver is scroll position.
Common Questions / FAQ
Who is gsap-timeline for?
Solo front-end builders and designers who code motion in JavaScript and want their agent to emit correct GSAP timeline patterns instead of generic animation advice.
When should I use gsap-timeline?
During Build when you choreograph hero sections, staggered reveals, or multi-step UI states; also when debugging animation order before Ship perf review on heavy landing pages.
Is gsap-timeline safe to install?
It is documentation-style procedural knowledge with no bundled executables; review the Security Audits panel on this Prism page and vet any GSAP version you add to your own package.json.
Workflow Chain
Then invoke: gsap scrolltrigger, gsap react
SKILL.md
READMESKILL.md - Gsap Timeline
# GSAP Timeline > Curated from GreenSock's official GSAP skills: https://github.com/greensock/gsap-skills ## When to Use This Skill Apply when building multi-step animations, coordinating several tweens in sequence or parallel, or when the user asks about timelines, sequencing, or keyframe-style animation in GSAP. **Related skills:** For single tweens and eases use **gsap-core**; for scroll-driven timelines use **gsap-scrolltrigger**; for React use **gsap-react**. ## Creating a Timeline ```javascript const tl = gsap.timeline(); tl.to(".a", { x: 100, duration: 1 }) .to(".b", { y: 50, duration: 0.5 }) .to(".c", { opacity: 0, duration: 0.3 }); ``` By default, tweens are **appended** one after another. Use the **position parameter** to place tweens at specific times or relative to other tweens. ## Position Parameter Third argument (or position property in vars) controls placement: - **Absolute**: `1` — start at 1 second. - **Relative (default)**: `"+=0.5"` — 0.5s after end; `"-=0.2"` — 0.2s before end. - **Label**: `"labelName"` — at that label; `"labelName+=0.3"` — 0.3s after label. - **Placement**: `"<"` — start when recently-added animation starts; `">"` — start when recently-added animation ends (default); `"<0.2"` — 0.2s after recently-added animation start. Examples: ```javascript 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 start ``` ## Timeline Defaults Pass defaults into the timeline so all child tweens inherit: ```javascript const 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 ``` ## Timeline Options (constructor) - **paused: true** — create paused; call `.play()` to start. - **repeat**, **yoyo** — same as tweens; apply to whole timeline. - **onComplete**, **onStart**, **onUpdate** — timeline-level callbacks. - **defaults** — vars merged into every child tween. ## Labels Add and use labels for readable, maintainable sequencing: ```javascript 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. ``` ## Nesting Timelines Timelines can contain other timelines. ```javascript 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"); ``` ## Controlling Playback - **tl.play()** / **tl.pause()** - **tl.reverse()** / **tl.progress(1)** then **tl.reverse()** - **tl.restart()** — from start. - **tl.time(2)** — seek to 2 seconds. - **tl.progress(0.5)** — seek to 50%. - **tl.kill()** — kill timeline and (by default) its children. ## Official GSAP Best practices - ✅ Prefer timelines for sequencing - ✅ Use the **position parameter** (third argument) to place tweens at specific times or relative to labels. - ✅ Add **labels** with `addLabel()` for readable, maintainable sequencing. - ✅ Pass **defaults** into the timeline constructor so child tweens inherit duration, ease, etc. - ✅ Put Scr