Animating with Framer Motion?

Framer Motion snapping, jittering or not animating? We sort it out.

Framer Motion makes animation easy right up to the point where a layout animation snaps between routes, AnimatePresence refuses to run the exit, or a page that respected reduced motion yesterday ignores it today. The library is powerful and does a lot behind the scenes, which is why the fix usually lives in the parent component, the keys, or the CSS, not where the symptom shows up. We work the stack until each transition does what the designer meant.

  • Since 2015Fixing technology
  • FreeEstimates
  • US teamReal engineers

framer-motion.log

still janky

What it is

Framer Motion at a glance

Framer Motion is the production animation library for React, maintained by the team behind the Framer design tool. It provides a motion primitive, layout animations, variants, gestures, drag, scroll-linked animation, and AnimatePresence for mount and unmount transitions, all with a declarative API that fits into the React component model.

By 2026 it is the default choice when a React app needs more than CSS transitions. The library has evolved to handle server components, reduced-motion preferences, and interoperability with the native View Transitions API, while keeping the original mental model of motion elements and animate props intact.

Type
Animation and gesture library for React
First released
2019 as Framer Motion v1
License
MIT, permissive
Maintained by
Framer and Matt Perry
Typically used for
Page transitions, layout animations, micro-interactions, drag and gesture UIs, scroll-linked effects

The honest version

Framer Motion pros and cons

No technology is all upside. This is where Framer Motion earns its place and where it tends to cause trouble.

Where Framer Motion is strong

  • Layout animations are magical when they workSetting layout on a motion div and changing its position or size animates the before and after automatically. A feature that used to need FLIP code of your own now comes for free.
  • Variants compose cleanly across parents and childrenA parent variant can orchestrate children through staggerChildren and delayChildren, letting a list reveal, a dialog open or a menu close feel considered rather than chaotic.
  • Gesture API covers hover, tap, pan and dragwhileHover, whileTap, drag and pan props mean most micro-interactions never need an event listener, which keeps components leaner and accessibility more consistent.
  • AnimatePresence handles unmount gracefullyComponents can have exit animations without the manual delay-then-remove dance that used to be standard React Transition Group work.
  • Spring physics that feel rightThe default spring tuning is good enough that you can ship it, and the tunable stiffness, damping and mass parameters let designers dial the feel without a math degree.
  • Reduced motion support out of the boxuseReducedMotion and the prefers-reduced-motion media query integrate cleanly, so the accessible fallback is a small code change rather than a parallel set of animations.

Where Framer Motion bites

  • Bundle size is not tinyThe full library is in the tens of kilobytes gzipped. For a marketing page that uses one fade in and one spring, that is a lot of weight; the m component and lazy loading help but are not automatic.
  • Layout animations have footgunsA motion component with position static, a parent that re-renders unexpectedly, or two components sharing a layoutId by accident all produce animations that snap or jump in ways that are hard to diagnose.
  • AnimatePresence keys are load bearingRoutes without unique keys do not exit, lists with reused keys exit the wrong items, and mode popLayout versus wait changes the behavior in subtle ways. The rules are documented but easy to get wrong.
  • SSR and hydration require careServer components that render motion children, or initial values computed from window, can diverge from the client render and trigger hydration mismatches that look unrelated to animation.
  • Drag with scrollable containers is fiddlyDrag constraints, scroll parents and viewport boundaries interact in ways that take experimentation. The constraint ref can tear off if the element unmounts mid drag.
  • Overused for things CSS would handleA simple hover scale or a fade in does not need a library. When Framer Motion becomes the default for every transition, the bundle grows and the maintenance surface grows with it.

Sound familiar?

Common Framer Motion problems we fix

The Framer Motion problems that bring people to us, and what you have once each one is fixed.

AnimatePresence exit animation cancelled

Exit animations never actually play

The child was removed in the same render as the AnimatePresence update, or the key was reused, so the exit transition is cancelled before the browser paints a single frame.

Exits run end to end

layoutId prop collision between two motion components

Shared layout animations jump to the wrong element

Two motion components with the same layoutId mounted at once, so the library animates between them and users see a thumbnail fly to a sibling instead of the hero image.

LayoutIds unique per transition

You are attempting to animate transform with a non-animatable value

Values like 'auto' refuse to animate

Height or width going to auto is not interpolable, so the animation snaps. The fix is usually a measured value or a layout animation that handles the transition for you.

Values interpolate smoothly

reduced motion user preference ignored by variant

Accessibility preference is not respected

A variant animates regardless of prefers-reduced-motion because the hook was not used or the variant does not have a reduced counterpart. Users who set the system preference see motion anyway.

Reduced motion honored across the app

Hydration mismatch: motion component rendered differently on server

SSR hydration mismatch at the first paint

An initial prop computed from window, or a motion component rendered in a server boundary without a client wrapper. React tears the HTML apart and re-renders, which users see as a flicker.

Server and client agree on first paint

drag constraints element was removed before drag completed

Drag tears off a swipe-to-dismiss sheet

A gesture that unmounts its own constraint ref mid drag, usually because the parent list re-ordered items while the drag was still in flight.

Drag survives parent renders

initial={false} prevented first mount animation

First mount animation plays when it should not

A route transition where the new page animates in on the initial render, flashing all the motion children. The initial={false} prop or a ref gate controls when mount transitions are allowed.

Only intended mounts animate

Invalid value for property transform: matrix3d(NaN, ...)

Transform produces NaN mid animation

A value interpolation that divided by zero, or a motion value hooked up to a state that briefly went undefined. The browser reports a transform error and the element flashes at its origin.

Motion values guarded against NaN

What we do

Framer Motion help, from one janky transition to the whole animation layer

Call us for one broken exit animation, or hand us the entire motion layer.

Rescue
Layouts snapping, exits refusing to fire, or drag tearing itself apart. We find the cause and stabilize the behavior first, then clean the code.
Layout animation design
Shared layouts, hero transitions and list reorder animations wired through the right parents, with keys and layoutIds that stay unique even under re-renders.
Accessibility pass
Reduced motion respected across every transition, focus moving correctly after route changes, and gestures that still work from a keyboard.
Performance tuning
Replacing JavaScript springs with CSS where appropriate, lazy loading the library on heavy pages, and making sure the animation layer is not blocking Core Web Vitals.
Design-dev handoff
Translating Framer and Figma prototypes into motion variants that match the design, with easing and timings that survive a review.
Managed Tech
Ongoing review of animation performance, accessibility regressions and library upgrades, plus a team to call when a new React version changes AnimatePresence behavior.

How it works

From first message to fixed

  1. Look Free estimate

    Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.

  2. Fix

    We fix the cause, not the symptom. If something is down, getting it back up comes first.

  3. Harden

    Backups, monitoring, updates and access, so the same problem can't quietly come back.

  4. Hand back or stay on

    You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.

Often found together

Running Framer Motion alongside something else?

We work on the whole stack, so the problem can be wherever it actually is.

Questions

Framer Motion questions

Something else? Call+1 737 727 7327

Why does our page transition snap instead of animating smoothly?

Usually a layout animation triggered on an element whose parent re-rendered, a motion component with position static, or two components sharing a layoutId by accident. The devtools help, but the fix is almost always a parent-level change rather than tuning the animation prop.

Our AnimatePresence exits do not play, what's wrong?

Three common causes: children without a unique key, a mode mismatch where popLayout was expected but wait was set, or the child unmounting from the tree in the same render as the parent condition flip. Fix any one and the exit usually comes back.

How do we keep Framer Motion from bloating the bundle?

Import the m component instead of motion, feed features through LazyMotion, and consider CSS transitions for one-off interactions. The library is fine on an app-wide scale; the problem is usually a marketing page importing the full motion object for one fade in.

Does Framer Motion respect reduced motion automatically?

Partially. It sets transition durations to zero when the preference is on, but variants that do big transforms, parallax effects or drag feedback still need an explicit guard with useReducedMotion. We audit for that case specifically because it is the most common accessibility regression.

Can we use Framer Motion with Next.js server components?

Yes, but every motion component must live inside a client boundary. The usual pattern is a thin client wrapper that re-exports motion primitives, which keeps the server tree clean and prevents hydration mismatches from motion props.

How much does Framer Motion help cost?

The initial look is free. Share the animation that is misbehaving, point us at the design intent, and we return a price before any work gets started.

Free estimate

Framer Motion giving you trouble?

Tell us what you're running and what's going wrong. A person reads it and comes back with an estimate.

  • No charge to find out what it will take
  • If it's urgent, say so

Replies come from a person. By sending, you authorize us to email you back. No marketing.