Motion 15.0.0, the animation library formerly known as Framer Motion, was published to npm on 4 December 2026. It’s a major version, but the maintainers say most projects can upgrade without code changes. The breaking changes are narrow: how SVG values are written, a new pathSpacing default, on-demand loading of layout and drag code, and inert on exiting elements.
The upside is a smaller first load (about 30% for the motion component, according to the changelog) and a long list of speed-ups. This guide covers what changed, how it can affect your app and tests, and how to upgrade with confidence. We installed [email protected] and checked that every import used below exists.
Install
npm install motion@15
# or, if you still use the old package name:
npm install framer-motion@15
Both motion and framer-motion were published as 15.0.0. The motion package supports React 18 and 19 as peer dependencies. You can also use it without React, through import { animate } from "motion".
Breaking change 1: SVG values are written as styles
motion SVG components now write values like cx, r, fill and strokeWidth to the element’s inline style when the browser supports them as CSS properties. The upgrade guide says this is up to 20% faster. Values that aren’t CSS properties, such as viewBox, d and attrX, are still written as attributes.
This matters in two situations.
Your stylesheet stops winning
An inline style beats a stylesheet rule, while an SVG attribute doesn’t. So this CSS no longer overrides an animated fill:
/* No longer overrides an animated fill in Motion 15 */
circle.status { fill: red; }
If you relied on the stylesheet value, remove that value from the animation and let CSS control it.
Reading the current value
After an animation starts, the attribute keeps its first value. Code that reads getAttribute("r") will see a stale number. Read the computed style instead:
const circle = document.querySelector("circle.dot")
// Motion 14 habit (stale in Motion 15):
// const r = circle.getAttribute("r")
// Motion 15:
const r = getComputedStyle(circle).r
Check any tests, analytics or custom hooks that read SVG attributes during animations.
Breaking change 2: the pathSpacing default
When pathSpacing isn’t set, Motion now calculates it as 1 - pathLength, which matches svgEffect. In version 14 it defaulted to 1.
A line drawn from pathLength: 0 to 1 looks the same as before. The difference shows when you animate pathOffset with a pathLength below 1. When the drawn segment reaches the end of the path, it now continues from the start, so you can loop a segment around a shape forever:
import { motion } from "motion/react"
export function Spinner() {
return (
<svg viewBox="0 0 100 100" width="48" height="48">
<motion.circle
cx="50" cy="50" r="40"
fill="none" stroke="currentColor" strokeWidth="8"
initial={{ pathLength: 0.25, pathOffset: 0 }}
animate={{ pathOffset: 1 }}
transition={{ duration: 2, ease: "linear", repeat: Infinity }}
/>
</svg>
)
}
To keep the version 14 behaviour, where the segment disappears off the end, set pathSpacing: 1 in initial. Motion also no longer writes stroke-dashoffset when pathOffset isn’t set.
Breaking change 3: layout and drag load on demand
The motion component now loads its layout animation and drag code the first time a component on the page uses layout, layoutId or drag. That’s where the smaller first load comes from, and your app code doesn’t need to change.
Tests are different. A test may expect these features to be ready synchronously. The fix is to preload them in your test setup:
// vitest.setup.js or jest.setup.js
import { preloadFeatures } from "motion/react"
beforeAll(async () => {
await preloadFeatures()
})
Notes from the upgrade guide:
- The CommonJS build, which Jest uses by default, already includes layout and drag code, so
preloadFeatures()resolves immediately there. - If your build produces a single file and can’t load code later, import from
motion/react-syncinstead ofmotion/react. - The
mcomponent andLazyMotionare unchanged. The changelog also saysdragis now 11 KB cheaper when you import it throughdomDragwithout layout animations.
Breaking change 4: exiting elements are inert
AnimatePresence now adds the inert attribute to a child while it animates out. Users can’t focus or click it, and assistive technology doesn’t read it. That’s better for accessibility, because a closing modal can no longer steal focus.
It can break tests that find or click an element during its exit animation. Wait for the exit to finish, or query for the element that replaces it.
Performance improvements you get for free
The changelog lists many speed-ups that need no code changes:
- Adaptive acceleration adjusts how values are animated and rendered to keep frame rates high.
- Re-rendering components with unchanged props is 90% faster, and variant switching is 10% faster.
animateLayoutstarts up and runs faster, and gives the first 100 projecting nodeswill-change. Animations withboxShadowcorrection are 25% faster.inViewnow poolsIntersectionObserverinstances, likewhileInViewdoes.scrollstops polling a container once all subscribers are cleared.opacity: 0on mount is rendered as0.001.
These figures come from the maintainers’ changelog. Measure your own pages before and after.
Using Motion without React
The vanilla JavaScript API gets several fixes too. For example, animate skips renders during the delay phase, and paused independent transform animations move correctly to the main thread. A small scroll-reveal with the vanilla API still looks the same:
import { animate, inView } from "motion"
inView(".card", (element) => {
animate(element, { opacity: [0, 1], y: [24, 0] }, { duration: 0.5 })
})
Upgrade checklist
- Bump
motion(orframer-motion) to 15.0.0. - Search for SVG styles in CSS that target elements you animate, and for
getAttributecalls on animated SVG. - Look for
pathOffsetanimations withpathLengthbelow 1, and addpathSpacing: 1if you want the old look. - Add
await preloadFeatures()to your test setup if tests uselayoutordrag. - Update tests that interact with elements while
AnimatePresenceis removing them.
The upgrade guide also mentions a “Motion AI Kit” whose /motion upgrade command can make these changes with an AI agent, if you prefer that.
Takeaway
Motion 15 trades a few narrow breaking changes for a lighter bundle and faster rendering. Most apps will upgrade with no edits. The ones that need attention are SVG-heavy UIs and test suites that rely on synchronous drag or layout code. Read the official Motion 15 upgrade guide before you merge.
