Course contentsShow
← React
Lesson 1970 of 2,39645. AnimationsFree lesson

The transition Prop: Controlling Animation Timing

Customize duration, delay, ease, and other timing properties for animations.

The transition Prop: Controlling Animation Timing

What you'll learn: How to fine-tune the timing, speed, and feel of Framer Motion animations using the transition prop.

By now you know how to animate elements with animate and initial. But those animations use default timing—often a simple spring physics model. The transition prop is where you take control: you specify how the animation should unfold, not just what should change.

Core Idea

The transition prop accepts an object that customizes timing properties like:

  • duration: How long the animation takes (in seconds)
  • delay: Wait time before the animation starts (in seconds)
  • ease: The easing function (e.g., "easeIn", "easeOut", "linear")
  • type: Animation type—"spring" (default) or "tween" (time-based)
  • stiffness, damping, mass: Fine-tune spring physics when type: "spring"

Think of transition as the director's instructions: "Move smoothly over 2 seconds, pause for 0.5 seconds first, and ease out at the end."

Example in Plain Terms

<motion.div
  initial={{ opacity: 0 }}
  animate={{ opacity: 1 }}
  transition={{ duration: 1.5, delay: 0.3, ease: "easeOut" }}
>
  Fade in slowly
</motion.div>

This tells Framer Motion: wait 0.3 seconds, then fade in over 1.5 seconds using an easing curve that slows down at the end.

You can even apply different transitions to different properties:

transition={{
  opacity: { duration: 1 },
  y: { duration: 0.5, ease: "easeInOut" }
}}

Key Takeaway: The transition prop gives you precise control over animation timing, letting you customize duration, delay, easing, and physics—transforming generic animations into polished, intentional motion.