Easing Functions in GSAP
You'll learn how to control the pace of your animations using GSAP's rich library of built-in easing options.
What Are Easing Functions?
Easing functions determine the rate of change during an animation. Without easing, animations move at a constant speed (linear), which often feels robotic. Think of easing like an elevator: it doesn't jolt from floor to floor at full speed—it accelerates smoothly, travels, then decelerates before stopping. Easing makes animations feel natural and polished.
GSAP's Built-in Easing Options
GSAP provides several easing families you specify with the ease property:
"none" (linear) — Constant speed, no acceleration or deceleration.
"power1" through "power4" — Increasing levels of acceleration/deceleration. power1 is gentle, power4 is aggressive. Add .in, .out, or .inOut to control when the easing applies:
.in— Starts slow, accelerates.out— Starts fast, decelerates.inOut— Eases both ends
"elastic" — Creates a springy, oscillating effect (like a rubber band snapping back).
"bounce" — Simulates bouncing motion (like a ball hitting the ground).
// Gentle ease out
gsap.to(".box", { x: 300, duration: 1, ease: "power1.out" });
// Aggressive ease in and out
gsap.to(".circle", { y: 200, duration: 1.5, ease: "power4.inOut" });
// Elastic bounce effect
gsap.to(".ball", { scale: 2, duration: 2, ease: "elastic.out" });
// Bouncing effect
gsap.to(".square", { y: 400, duration: 2, ease: "bounce.out" });
The choice of easing dramatically affects animation feel—subtle differences create professional polish.
Key Takeaway: GSAP's easing functions like power, elastic, and bounce control animation pacing, transforming mechanical motion into natural, engaging movement through acceleration and deceleration curves.