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

Animating Multiple Properties Simultaneously

Animate x, y, scale, opacity, rotate, and more in a single animate declaration.

Animating Multiple Properties Simultaneously

What you'll learn: How to animate several visual properties at once in a single Framer Motion declaration for fluid, coordinated motion.

The Core Idea

In Framer Motion, you're not limited to animating just one property like opacity or x. You can specify multiple properties in the same animate object, and Framer Motion will smoothly interpolate all of them simultaneously. This creates rich, coordinated animations where elements move, scale, rotate, and fade all at the same time.

Think of it like conducting an orchestra—instead of playing one instrument, you're coordinating multiple instruments (properties) to create a harmonious effect.

The Pattern

<motion.div
  initial={{ 
    x: 0, 
    y: 0, 
    scale: 1, 
    opacity: 0, 
    rotate: 0 
  }}
  animate={{ 
    x: 100, 
    y: 50, 
    scale: 1.5, 
    opacity: 1, 
    rotate: 180 
  }}
  transition={{ duration: 1 }}
>
  Complex animation
</motion.div>

This component will simultaneously:

  • Move right (x: 100)
  • Move down (y: 50)
  • Grow larger (scale: 1.5)
  • Fade in (opacity: 1)
  • Rotate half a turn (rotate: 180)

All properties animate together over the same duration, creating a single cohesive motion. You can mix layout properties (x, y), transforms (scale, rotate), and visual properties (opacity, backgroundColor) without any extra configuration.

You can also give individual properties different timing:

<motion.div
  animate={{ x: 100, opacity: 1 }}
  transition={{ 
    x: { duration: 2 },
    opacity: { duration: 0.5 }
  }}
/>

Key Takeaway: Framer Motion lets you animate multiple properties (x, y, scale, opacity, rotate, etc.) in a single animate declaration, creating rich, coordinated animations that feel polished and intentional.