framer-motion
14.7.1 · 27 Oct 2026MIT45.3M / weekRepositoryHomepagenpmAtom feed
Upgrading framer-motion from 1.16.18 to 2.0.0
1 release in betweenevery note read
- 5
- changes to make
- 0
- advisories fixed
- 5
- new
- 1
- fix
Before you upgrade
Tick each one off as you go- breaking2.0.0
- breaking2.0.0
- breaking2.0.0
- breaking2.0.0
- breaking2.0.0
Release by release
- new
layoutprop for automatic layout animations. - new
AnimateSharedLayoutandlayoutIdfor shared layout animations. - new
onMeasureDragConstraintsprop that fires whendragConstraintsare measured. - new
useIsPresent, a read-only version ofusePresence. - new
Allow
dragConstraintsto be a ref that is smaller than the draggable element. - fixed
Removing a
MotionValuefromstylenow correctly unsets it from the element.
- new
4 other lines we could not sort, mostly version bumps
- 2.0.0
Using
Proxyto generatemotioncomponents. This saves ~0.5kb from the bundle size and ensures compatibility with all DOM elements and Web Components. - 2.0.0
xandytransform values won't change as a result of a drag gesture as this now works via layout projection. - 2.0.0
Drag events now report
pointas the pointer relative to the viewport, in line with other pointer events. - 2.0.0
Changed build process and using Terser for uglification. Reduces bundle size by ~1.2kb. (@stokesman in #596)