Code
GSAP
Tweens
gsap.to(), gsap.from(), gsap.fromTo() — the three core tween methods
Timeline
Sequence and overlap tweens with gsap.timeline() and position parameters
Easing
Visual comparison of built-in ease functions: power, elastic, bounce, back
Stagger
Cascade animations across a grid of elements with the stagger option
ScrollTrigger
Animate elements on scroll with the ScrollTrigger plugin and scrub
MotionPath
Move elements along SVG paths with autoRotate using MotionPathPlugin
FLIP
Smooth layout transitions — capture state, mutate DOM, animate with Flip.from()
Generative Art
Algorithmic particle system with orbital motion, hue cycling, and pulse animations
Timeline
Beginnergsap.timeline() sequences tweens in order, overlaps them with position parameters (<, -=, labels), and applies shared defaults. GSAP Docs
const tl = gsap.timeline({
repeat: -1, yoyo: true,
defaults: { ease: 'power1.inOut' }
});
tl
// plays after previous ends
.to(box, { x: 200, duration: 0.8 })
// starts 0.1s after previous ends
.to(box, { y: 60, duration: 0.6 }, '+=0.1')
// starts 0.2s into previous tween
.to(box, {
rotation: 360, scale: 1.3,
duration: 0.7
}, '<0.2')
// 0.4s before end of timeline
.to(trail, {
scaleX: 1.6, opacity: 0.6,
duration: 0.5
}, '-=0.4')
// label 'step2' as a bookmark
.to(dot, {
x: 200, backgroundColor: '#ef4444',
duration: 0.9
}, 'step2')
.to(box, {
scale: 1, rotation: 0,
duration: 0.4
}, 'step2+=0.2');