Spring Animations vs Tween: The type Property
What you'll learn: How to choose between physics-based spring animations and time-based tween animations in Framer Motion for different feels.
The Core Difference
Framer Motion offers two fundamentally different animation engines controlled by the type property in your transition object:
Tween animations are time-based. You specify a duration, and the animation completes in exactly that time, following a timing curve (like easeInOut). Predictable and controlled.
Spring animations are physics-based. Instead of duration, you define physical properties like stiffness, damping, and mass. The animation behaves like a real spring bouncing toward its target. The "duration" emerges naturally from the physics.
When to Use Each
Use tweens when you need:
- Precise, predictable timing (exactly 0.3s)
- Synchronized choreography across multiple elements
- Smooth, controlled motion without overshoot
- Animations tied to timelines or sequences
Use springs when you want:
- Natural, organic feel with subtle bounce
- Responsive, "alive" interactions
- Motion that feels physically realistic
- User-driven animations (dragging, gestures)
The Syntax
// Spring (default in Framer Motion)
<motion.div
animate={{ x: 100 }}
transition={{
type: "spring",
stiffness: 100,
damping: 10
}}
/>
// Tween
<motion.div
animate={{ x: 100 }}
transition={{
type: "tween",
duration: 0.5,
ease: "easeInOut"
}}
/>
Think of tweens as a choreographed dance with precise timing, while springs are like a gymnast responding naturally to forces.
Key Takeaway: Use type: "spring" for lively, physics-based motion that feels organic, and type: "tween" when you need precise, time-controlled animations with predictable durations.