framer/motion v2.0.0 Release Notes
Release Date: 2020-07-15 // almost 4 years ago-
โ Added
-
layout
prop for automatic layout animations. -
AnimateSharedLayout
andlayoutId
for shared layout animations. -
onMeasureDragConstraints
prop that fires whendragConstraints
are measured. -
useIsPresent
, a read-only version ofusePresence
. - Allow
dragConstraints
to be a ref that is smaller than the draggable element.
โ Removed
-
positionTransition
andlayoutTransition
props (uselayout={true}
instead). -
Point
type in favour ofPoint2D
. - ๐
useAnimatedState
: Moved to Framer library. -
dragOriginX
,dragOriginY
props. - ๐
stylefire
as a dependency.
๐ Fixed
- ๐
Removing a
MotionValue
fromstyle
now correctly unsets it from the element.
๐ Changed
- ๐ Using
Proxy
to generatemotion
components. This saves ~0.5kb from the bundle size and ensures compatibility with all DOM elements and Web Components. -
x
andy
transform values won't change as a result of a drag gesture as this now works via layout projection. - Drag events now report
point
as the pointer relative to the viewport, in line with other pointer events. - ๐ Changed build process and using Terser for uglification. Reduces bundle size by ~1.2kb. (@stokesman in #596)
-