← Back to Blog

Framer Motion vs CSS Animations: Which Should You Use?

November 23, 2026

ReactAnimationPerformanceFramer Motion

Choosing between Framer Motion and CSS animations feels like a constant debate in the React ecosystem. Both are powerful, both can deliver smooth, beautiful animations — but they excel in different contexts. After building dozens of projects with both approaches, I've learned when to reach for each.

The Contenders

CSS Animations are the native browser standard. They're built into the rendering pipeline, optimised by the browser itself, and require zero JavaScript dependencies.

Framer Motion is a production-grade animation library for React that wraps Web Animations API and CSS under a clean declarative interface, handling complexity gracefully.

The choice isn't "one is better" — it's "which fits your problem?"

Performance Head-to-Head

Let me show you the actual difference. Watch these two animations side by side:

Left: a linear CSS animation. Right: a Framer Motion eased animation (with a bouncy spring). Both hit 60fps on modern hardware, but here's what changes with scale.

Real-world metrics

For a simple transform (position, scale, rotate) on a single element:

  • CSS: ~0.5ms per frame
  • Framer Motion: ~1–2ms per frame (slight overhead from React reconciliation)

Scale to 10 simultaneous animations across a page:

  • CSS: Still ~0.5ms (all GPU-accelerated)
  • Framer Motion: ~3–5ms (acceptable, but noticeable on lower-end devices)

Winner at scale: CSS — especially on mobile.

When to Use CSS Animations

Use CSS when:

  1. You need maximum performance on a large number of animations. Hover effects, loading spinners, decorative pulsing — CSS is the native choice and will never stutter.
  2. The animation is stateless and self-contained. A button hover, a carousel auto-play, a background shimmer. These don't need React state management.
  3. You're not responding to user input or dynamic values. Once you need to pause, reverse, or change the animation based on something happening in React, CSS starts to hurt.

Example: Hover effect

.button {
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.button:hover {
  background-color: #10b981;
  transform: scale(1.05);
}

This is perfect in CSS. No JavaScript overhead, instant feedback.

When to Use Framer Motion

Use Framer Motion when:

  1. Your animation responds to React state. When a modal opens, an accordion collapses, a user drags — you need animation logic tied to your app's state.
  2. You need choreography across multiple elements. Staggering child animations, orchestrating sequences, coordinating complex interactions.
  3. You want powerful easing and spring physics without reinventing the wheel. type="spring" with configurable stiffness and damping beats hand-tuning cubic-bezier curves.

Example: Modal entrance

import { motion } from "framer-motion";

export function Modal({ isOpen, onClose }) {
  return (
    <motion.div
      initial={{ opacity: 0, scale: 0.95 }}
      animate={isOpen ? { opacity: 1, scale: 1 } : { opacity: 0, scale: 0.95 }}
      exit={{ opacity: 0, scale: 0.95 }}
      transition={{ type: "spring", stiffness: 300, damping: 30 }}
    >
      {/* Modal content */}
    </motion.div>
  );
}

This responds to isOpen. Doing this cleanly in CSS is messy or impossible.

A Practical Hybrid Approach

Here's what I do in real projects:

  1. CSS for page chrome and micro-interactions. Buttons, hover states, loading bars, decorative elements. These are "set it and forget it."
  2. Framer Motion for user-driven interactions. Modals, accordions, carousels controlled by React state, draggable elements, page transitions.
  3. Stop overthinking it. Framer Motion isn't slow for most use cases. If you're animating 50+ elements simultaneously, sure, consider CSS. Otherwise, pick based on ease of implementation.

A Decision Flowchart

Is the animation responding to React state or user interaction? → Framer Motion

Is it a pure decorative or hover effect? → CSS

Are you animating 20+ elements at once? → CSS (or reconsider the design)

Do you need spring physics or complex choreography? → Framer Motion

Otherwise, pick the one that feels cleaner to write. Both are fast enough.

The 2026 Reality

GPU acceleration has made CSS animations blazingly fast. React has also improved; the overhead of Framer Motion is now negligible for most interfaces. The real bottleneck in modern apps is usually API calls or big DOM trees, not animation math.

This means you can often reach for Framer Motion for convenience without worrying about perf. But if you're shipping to low-end devices, animating hundreds of elements, or just want to flex your CSS knowledge — CSS is still the performant choice.

My Recommendation

Master both. Reach for CSS first for simple effects. Reach for Framer Motion when you notice your state-driven animation logic getting tangled in CSS classes and JavaScript event listeners. Neither is wrong; they're just different tools for different jobs.

What did you think of this post?

Further Reading

Related posts