gsap-timeline

Sequences GSAP tweens into timelines using position parameters, labels, and nesting.

1|Updated Aug 20, 2023
One-click install
npx skills add https://github.com/imanlangaran/mini-projects --skill gsap-timeline-imanlangaran
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gsap-timeline
Source: https://github.com/imanlangaran/mini-projects/tree/main/building-sell/.claude/skills/gsap-timeline
Command: npx skills add https://github.com/imanlangaran/mini-projects --skill gsap-timeline-imanlangaran

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gsap.

What problem does it solve? Coordinating multiple animations with chained delays is fragile and hard to maintain. This Skill provides the correct GSAP timeline patterns for sequencing, overlapping, and controlling multi-step animations in JavaScript. ## Core Features & Use Cases - Timeline Sequencing: Create timelines with gsap.timeline() and place tweens precisely using the position parameter (absolute times, relative offsets, labels, "<" and ">" placement). - Labels and Nesting: Organize complex animations with addLabel(), nest child timelines inside master timelines, and navigate with play(), tweenFromTo(), and seek controls. - Playback Control: Manage animation state with play, pause, reverse, restart, time, progress, and kill methods, plus timeline-level defaults and callbacks. - Use Case: When building a landing page hero animation where a logo fades in, text slides up, and a button scales in with overlap, use this Skill to choreograph all tweens on one timeline with labels instead of fragile setTimeout or delay chains. ## Quick Start Use the gsap-timeline skill to build a timeline that fades in a header, then slides up three cards with a 0.2 second stagger overlap.

Frequently Asked Questions about gsap-timeline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sequence multiple GSAP animations in order?

Create a timeline with gsap.timeline() and chain .to() calls, which append tweens sequentially by default. Use the position parameter as the third argument to control exact placement, such as "+=0.5" for gaps or "<" to start with the previous tween.

What is the GSAP position parameter and how does it work?

The position parameter is the third argument in timeline tween methods that controls when a tween starts. It accepts absolute times like 1, relative offsets like "+=0.5" or "-=0.2", label names, and placement shortcuts "<" (start with previous) and ">" (after previous ends).

Can I nest timelines inside other GSAP timelines?

Yes, GSAP timelines can contain other timelines using master.add(child, position). This lets you build modular animation sequences and compose them into a master timeline, though ScrollTriggers should only be placed on top-level timelines.

Should I use delay or a timeline for multi-step GSAP animations?

Use a timeline instead of chaining delays. Timelines with the position parameter give precise, maintainable control over sequencing, while delay-based chains break easily when durations change and cannot be controlled as a single unit.

How do I control GSAP timeline playback after creation?

Use tl.play(), tl.pause(), tl.reverse(), and tl.restart() for playback state, and tl.time(2) or tl.progress(0.5) to seek to specific points. Create a paused timeline with { paused: true } and start it later with play().