gsap-timeline
What it does
This tool helps organize multiple animations so they happen in a specific order, like a sequence of steps. You can control exactly when each animation starts and finishes.
When to use it
- βWhen you want several animations to happen one after another.
- βTo create an effect where one animation only starts after another finishes.
- βWhen you need animations to start at the same time or at precise moments.
Skill link
https://github.com/nexu-io/open-design/blob/main/skills/gsap-timeline/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCreate an animation where a square appears, then moves right, and finally disappears.β
5 new skills a week. 1 minute to read.
How it works
You tell the AI which animations to create and how they relate. The tool organizes these animations on a timeline, defining the order and timing of each.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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
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:
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:
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:
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.
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 ScrollTrigger on the timeline (or top-level tween), not on tweens inside a timeline.
Do Not
- β Chain animations with delay when a timeline can sequence them; prefer
gsap.timeline()and the position parameter for multi-step animation. - β Forget to pass defaults (e.g.
defaults: { duration: 0.5, ease: "power2.out" }) when many child tweens share the same duration or ease. - β Forget that duration on the timeline constructor is not the same as tween duration; timeline βdurationβ is determined by its children.
- β Nest animations that contain a ScrollTrigger; ScrollTriggers should only be on top-level Tweens/Timelines.
FAQ
What is an animation 'timeline'?
It's like a script for your animations. It dictates what should happen, when it should happen, and in what order.
Can I make animations happen at the same time?
Yes, you can tell the tool that two animations should start together, or that one should start as soon as another finishes.
Is it hard to control animation timing?
No, you can use simple commands to say start at an exact time, right after another animation, or at the same time as another.
Details
Original description by the author
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).
repo: nexu-io/open-design
Popularity
- GitHub stars
- 101k
- Ranking position
- #1185
- License
- Apache-2.0
- Updated
- 10/15/2026
Comments
- β¦
More skills from this repository
sample-plugin
101kMakes your agent create a metadata file for tests. It helps ensure code works correctly in different situations.
aster-atelier
101kHelps your agent create an artistic website with a classic look. It uses elegant imagery, blue skies, and serif fonts for a cinematic feel.
audio-jingle
101kMakes your agent generate audio like jingles and sound effects. It can create music and voices, saving the result as an audio file.
blog-post
101kHelps your agent write long articles or blog posts. It includes space for images, quotes, and author information.
Similar skills
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.