Transition Configuration
You'll learn how to fine-tune Framer Motion animations by controlling timing, easing, duration, and spring physics using the transition prop.
The Core Idea
While the animate prop tells Framer Motion what to animate, the transition prop tells it how to animate. Think of it like directing a scene: animate specifies where the actor should move, but transition determines whether they walk slowly, run quickly, or bounce playfully to get there.
The transition prop is an object that accepts various configuration options to customize animation behavior.
Common Transition Properties
Duration and timing:
<motion.div
animate={{ x: 100 }}
transition={{ duration: 2, delay: 0.5 }}
/>
Easing functions:
<motion.div
animate={{ opacity: 1 }}
transition={{
duration: 1,
ease: "easeInOut" // or "linear", "easeIn", "easeOut"
}}
/>
Spring physics (natural, bouncy motion):
<motion.div
animate={{ scale: 1.2 }}
transition={{
type: "spring",
stiffness: 100,
damping: 10
}}
/>
Why This Matters
Without configuring transitions, animations use default values that might not match your design intent. Spring physics create organic, responsive motion that feels alive. Duration and easing control create precise, polished effects. You can even mix types—use springs for position changes but tween for opacity.
<motion.button
animate={{ x: 100, opacity: 1 }}
transition={{
x: { type: "spring", stiffness: 300 },
opacity: { duration: 0.5 }
}}
/>
Key Takeaway: The transition prop gives you granular control over animation characteristics—combine duration, easing, delays, and spring physics to create animations that feel exactly right for your interface.