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
MotionPath
Advanced Move elements along arbitrary SVG paths using the MotionPathPlugin. autoRotate tilts the element to follow the curve's tangent. GSAP Docs
🚀
import { MotionPathPlugin } from
'gsap/MotionPathPlugin';
gsap.registerPlugin(MotionPathPlugin);
// Follow an SVG path — with auto-rotation
gsap.to(rocket, {
duration: 4,
ease: 'none',
repeat: -1,
motionPath: {
path: '#mp-curve', // <path> element
align: '#mp-curve', // align origin to path
alignOrigin: [0.5, 0.5],
autoRotate: true, // rotate to follow tangent
},
});
// Follow a circle path
gsap.to(orb, {
duration: 3,
ease: 'none',
repeat: -1,
motionPath: {
path: '#mp-circle',
align: '#mp-circle',
alignOrigin: [0.5, 0.5],
},
});