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
Tweens
Beginner The three core tween methods — gsap.to(), gsap.from(), and gsap.fromTo() — each animating a box with different eases and options. GSAP Docs
gsap.to()
gsap.from()
gsap.fromTo()
// gsap.to — animate TO values
gsap.to(box1, {
x: 180, rotation: 360,
duration: 1.4, ease: 'power2.inOut',
repeat: -1, yoyo: true
});
// gsap.from — animate FROM values
gsap.from(box2, {
scale: 0, opacity: 0,
duration: 1.2, ease: 'back.out(1.7)',
repeat: -1, repeatDelay: 0.5, yoyo: true
});
// gsap.fromTo — define start AND end
gsap.fromTo(
box3,
{ y: -30, opacity: 0, skewX: 20 },
{
y: 30, opacity: 1, skewX: -20,
duration: 1, ease: 'sine.inOut',
repeat: -1, yoyo: true
}
);