Motion adheres to Semantic Versioning.
Undocumented APIs should be considered internal and may change without warning.
- Added
motionValue
to vanilla JS entrypoint.
- Removed
framer-motion-3d
package.
- Fixed reading initial transform values from elements.
- Removed pointer capture from pan and drag gestures.
- Preventing flattening of scroll animations when
type
orease
are explicitly set.
- Adding UMD bundles for
motion-dom
andmotion-utils
.
- Fixed
Reorder.Item
reordering causinglostpointercapture
event to fire.
- Fixed exiting children with
layoutDependency
not animating layout changes because of a stale layout dependency.
- Fixed
AnimatePresence
not triggering exit animations when a child withlayout
ordrag
is removed.
- Fixed drag gesture on child elements.
- Fixed
onClick
handlers not working insidepress
events.
- Changed press, drag and pan gestures to use pointer capturing for better usage within
iframe
embeds.
- Restored warning for when animating more than two keyframes with a spring.
- Preventing
press
from triggering when an element is disabled.
- Check for
transition
ininitial
when animating removed values.
- Added
initial
option touseInView
.
- Correctly applying CSS variables at the end of a mini
animate
animation.
- Added
usePresenceData
to get custom data passed toAnimatePresence
in descendant components.
- Added unit support to
useSpring
.
- Bug with
AnimatePresence
in React 19 strict mode.
- Motion 3D.
- Moving
updateSVGDimensions
to its own file to help with tree-shaking.
- Providing
MotionValue
tomotion
component frommotion/react-client
entrypoint.
- Removing React from bundle.
- Infer type of
children
prop formotion.create
.
- Fixed SVG transform animations via
animate
.
- Discard layout projection snapshots if 0x0.
- Fix scale correction for CSS variables.
- Add scale correction for CSS variables.
- Fixed toggling between shared layout animations multiple times.
- Added private
anchorX
prop toAnimatePresence
.
- Simplified
useSpring
for smaller bundlesize.
- Prevent relative animations from restarting layout animations unnecessarily.
press
,hover
andinView
now pass the target element as the first argument to the gesture start callback.
- Animations with
transformTemplate
not hardware accelerated.
AnimatePresence
types in React 19.- SVG with
transform
not always setting styles correctly on mount.
- Adding
animateSequence
to perform animation sequences via WAAPI for a tiny bundlesize.
- Missing
AnimationControls
type export.
- Remeasure SVG when size/position changes to ensure correct
transform-origin
.
- Added
propagate
toAnimatePresence
. This prop allows parent exit animations to be propagated to children.
- Removed
exitBeforeEnter
fromAnimatePresence
.
- Fixing timelines where a string label is used as the first segment.
- More movement values like
height
andtop
are now blocked by reduced motion.
- Fixed
scroll
progress being stuck at1
when atarget
is100vh
.
- Fix type of
attachTimeline
whenskipLibCheck
is disabled.
- Checking return of
press
,hover
, andinView
callbacks before calling.
- Restoring missing type exports.
- Adding
displayName
tomotion
components. - Ensure
press
doesn't overridetabindex
when explicitly set.
- Added
view()
alpha to early access.
- Add support for
repeat
in animation sequences.
- Clearing scheduled jobs at the end of an animation frame to ensure memory is released should the animation loop settle.
- Exporting
AnimationSequence
via"motion"
entrypoint. - Adding support for passing normal components to
motion.create()
in React 19.
- Fixing
motion-dom
andmotion-utils
entrypoints.
- Exporting
time
for internal use. - Making
MotionValue.updatedAt
public for internal use.
- Fixing missing license in
motion-dom
andmotion-utils
packages.
- Added
press
gesture in Motion+ early access.
- Adding React 19 to optional peer dependencies in
"motion"
package also.
- Adding React 19 to optional peer dependencies in
"framer-motion"
packages.
- Fixing types for React 19.
- Attempting to update types to be compatible with both React 18 and 19.
- Hover gesture now always
passive: true
.
- SVG elements (like
motion.text
) now update when given aMotionValue
as children, matching HTML element behavior. - Exporting
DynamicAnimationOptions
type.
- Vanilla
hover
gesture in Motion+ early access.
- New
visualDuration
option forspring
animations. - New
spring(visualDuration, bounce)
syntax.
- Fixing
stagger
with minianimate
.
- Ensuring animations passed to
scroll
are scrubbed linearly. - Fixing
mini
types entrypoint. - Exporting easing types from
"motion"
.
- Fixing
mini
andreact-mini
entrypoints.
- Fixing fallback entry points for
"motion/react"
etc.
- Fixing build and entry points for
"motion"
.
- Adding
"motion"
package. - Replaced Motion One (see upgrade guide).
- Fixing double
update()
call on mount.
- Removing
will-change
from SSR.
will-change
is now no longer automatically managed withoutuseWillChange
.
- Fixing fallback
package.json
for entrypoints in older versions of Node.
- Improving generic value signature for
animate
.
- Allowing generic motion value types in
animate
.
- Removed ability to define CSS variables on
style
without casting, as this was conflicting with ReactCSSProperties
.
- Memoize
AnimatePresence
safeToRemove
. - Remove duplicate
layout="size"
annotation.
- Remove
as any
requirement for CSS variables.
- Make
BezierDefinition
readonly
for easier definition outside aTransition
.
- Fixed optimised appear effects in granular Suspense environments.
animate
can now animate any object.
delay
with seconds now exported from"framer-motion/dom"
.
- Only
transform
is added towill-change
when a potentially layerising value is animated asopacity
andfilter
will prematurely flattenpreserve-3d
.
- Mini
animate
anduseAnimate
functions.
- Easing functions now get compiled into
linear()
easings when animating via WAAPI.
- Added support for custom animation generators via
type
.
- Added
info
and element tracking toscroll
. - Added
steps
easing.
- Values added to
will-change
now stay there for their lifespan to prevent GPU thrashing and weird Safari subpixel jitters.
- Ensuring updating motion values during
render
doesn't lock rendering for an element.
- Changed values of child variants now animate even when the parent variant name hasn't changed.
- Improving tree-shakability.
Reorder
components now importmotion
proxy.
- Changing
motion()
deprecation warning towarnOnce
.
- Exporting
findSpring
for internal use.
motion.create()
andm.create()
.
motion()
andm()
.
- Support for React Server Components, including new entrypoints for
motion
andm
components.
- Detects conflicts between optimised animations and rendered
style
. - Resumes optimised animations where possible once layout measurements are complete.
- Removed double
"change"
handler on externally-providedMotionValue
s.
- Selective cancellation of optimised appear animations.
- Use
startTime
instead ofelapsed
to sync optimised animations.
- Allow manual setting of
startTime
via animation options (currently for internal use only).
- Improving synchronisation between DOM animations on externally-provided
MotionValue
s and internalMotionValue
s. - Fixing unit conversion on DOM animations with externally-provided
MotionValue
s.
- Improve calculation of
startTime
to prefer the immediacy of animation creation over keyframe resolution, but fall back to the latter if the former would lead to a perceptual jump.
- Fixing incorrect version publish.
- Improving optimised appear animation check from
data-appear-id
to active recording of started animations. - Only cancelling optimised appear animations from layout animations when they're animating
transform
.
- Fixing spring animations with explicit velocities that animate to their current value.
- Removing default transforms from generated
transform
string provided totransformTemplate
.
- Improved performance of
transform
by up to 30% when providing many default transforms asMotionValue
s.
- Fixed problem with
AnimatePresence
not rerendering children unless their presence had changed.
- Improved correctness of
AnimatePresence
and made safe to use with concurrent rendering.
domMin
feature bundle.
- Exporting
UseScrollOptions
type.
- Improved types for
inView()
'smargin
property.
- Wrapping
usePresence
'ssafeToRemove
callback inuseCallback
leading to fewer re-renders.
- Fixing
position: fixed
layout animations while scrolling.
- Improving
useSpring
types so it acceptsMotionValue<string>
orMotionValue<number>
but always returnsMotionValue<number>
.
- Removing
"react"
import from DOM-only bundle.
- Changing
isBrowser
check fromdocument
towindow
.
- Improve performance of
window.MotionDebug
check.
- Improve performance of layout animation calculated projection comparisons.
- Active render scheduling check to prevent unnecessary
Set
lookups.
- Minor performance improvements for layout animations.
- Ensuring DOM bundle doesn't include
react
andreact-dom
as dependencies.
- Check for
display: contents
elements now against component props instead ofElement.style
.
- Frameloop now uses a single
Set
vsSet
andArray
, leading to smaller bundlesize and better performance under heavy load.
- No longer adding
background-color
towill-change
.
- Externally-provided
MotionValue
s are no longer permanently added towill-change
.
- Animations automatically optimised via
will-change
.
- Improved performance of core render loop.
- Checking for
null
before interpolating color values.
- Fixing
dragConstraints={ref}
mixed with layout animations.
- Changing invalid number interpolation from error to warning and immediate mix.
- Fixing animation of CSS variables when leading space is present.
- Ensuring instant animations return animation controls.
- Only allow layout animations to cancel optimised appear animations when on the same node or an ancestor.
- Fixed optimised appear animations interrupted by layout animations triggered by a state update within
useLayoutEffect
.
- Fixing layout animations within portals. Tag
motion
root within portal withdata-framer-portal-id
attribute.
- Batching triggering animations with
useSpring
.
MotionValue
s created withundefined
can track velocity correctly.
- Fixed visual jump when interrupting an optimised appear animation.
- Improved performance of resolving variants by lazy resolving current
MotionValue
state.
- Binary visibility interpolation i.e
display: ["block", "none"]
now maintains the visible state throughout the animation.
- Reinstating async event handlers to fix issues with user code and Suspence within Framer.
- Animating between keyframe unit types when one keyframe is
0
and the other is an explicitly defined keyframe, e.gy: ["100%", 0]
.
- Updating types for
motion.div
.
- Binding
stop
toMainThreadAnimation
- Exporting
DOMMotionComponents
.
- Fixing types of
motion.div
in certain TS5 environment configurations.
- Skip removal of existing motion value when
undefined
.
- ESM compat with CJS bundle.
- Ensuring transforms unset during unit conversion are restored.
- Updating JSX transform.
- TypeScript 5 upgrade.
- Ensure CSS var token is set as final animation keyframe.
- Skipping animations with
duration: 0
.
- Adding
perspective()
to projection transform. - Changing scheduling of
useTransform
to ensure frames are up-to-date.
- Ensuring
motion(Fragment)
nodes are skipped from layout projection.
- Changes in
style
are visible once a value is no longer present in animation props.
- Fixed layout animations when combined with
z
transforms.
- Fixed pre-generation of no-op WAAPI animations.
- Fixed interrupting WAAPI spring animations.
- Fixed interrupting shared element animations that contain
rotate
orskew
transforms.
- Fixed layout animations when combined with
skew
transforms.
- Default
duration
doesn't overrideduration: 0
WAAPI animations. - Fix error when trying to animate unmounted element.
- Avoid resolving WAAPI animation when stopping unresolved animation.
- Interruption of WAAPI animations now animates from correct value.
- Restored animation promise handling to match behaviour of <11.0.11.
- Fixed measurements when more than one transform changes unit type.
- Fixed animation controls in instances where keyframes resolve to be unanimatable.
- Added default value types for
backgroundPositionX
andbackgroundPositionY
.
- Fixed
height: auto
animations.
- Updated
@emotion/is-valid-prop
as peer dependency.
- Keyframes now resolved asynchronously.
- External event handlers now fired synchronously.
- CSS variables and unit conversion now supported with >2 keyframe animations.
- Removed WAAPI animation of
background-color
.
- Improved speed and stability of regexes.
- Added support for Content Security Policy (CSP) nonces via
MotionConfig
.
- Ensure optimised appear animations are cancelled before layout animation measurements.
- Strip comments from strings before testing if they're CSS variables to prevent significant performance degradation.
- Added support for
motion(Fragment)
for controlling variants. For internal Framer use only.
- Performance updates.
- Tighten check for
navigator.userAgent
.
- Fixed layout animation bug in Framer.
- Fixed velocity calculations when interrupting WAAPI animations.
- Support for internal
transformValues
prop.
- Replaced velocity-check jobs in favour of passive detection.
- Post-commit render moved to a microtask.
globalTapTarget
for use in Framer.
- Fixed
animate
sequencing forMotionValue
s.
- Fixed
layout
prop crashing Motion 3D.
- Export
UseInViewOptions
.
- Improve error message when trying to animate multiple keyframes via spring.
- Adding
null
safeguard foruseAnimationControls
.
- Fix touch event filtering for hover gesture.
- Ensure cancelled WAAPI animations can't finish.
- Fixing final keyframe when using
repeatType
"reverse"
and"mirror"
. - Display warning if scroll
container
isposition: static
. - Move more scroll measurements to
read
frame lifecycle. - Adding
amount
touseInView
dependencies.
- Ensure keyframe animations don't rerun if all values are the same.
- Unset gestures correctly animate back to values defined in parent variant.
- Fixed issues with duration-based springs appearing stuck or snapping.
- Fixed issue with
dragSnapToOrigin
not continuing animation when interrupted.
- Adding
MotionGlobalConfig.skipAnimations
to globally disable animations when testing.
circInOut
easing fixed.- Improved optimised animation handoff.
- Ensure
animateChanges
only runs in layout effect in initial render.
- Ensure animations don't attempt to fire when
initial
equalsanimate
.
- Improved animation skipping for keyframe lists.
- Use single animation to detect document paint ready before triggering optimised animations.
- Measure one time for optimised animation start and one for handoff to emulate frame scheduling.
- Ensure animation is never skipped if it's an interrupting animation.
- Fixing appear animation optimisation when React portal is present.
- Skipping no-op animations.
- Added
disableInstantAnimation
private API. - Ensure optimised appear animations don't run post-hydration.
- Fixing pan events within React portal.
- Fixing
Reorder
component types. - Fixing
Reorder.Item
order calculation. - Fixing broken
dragConstraints
if component re-renders during resize.
- Fixing
AnimatePresence
fast rerender bug.
- Changed handoff
startTime
source fromperformance.now()
todocument.timeline.currentTime
.
- Improved compatibility of custom
RefObject
andMutableRefObject
types. - Fixing
useScroll
dependencies array. - Fixing optimised handoff to WAAPI animations.
- Improved performance of frameloop scheduling.
- Fixed crasher when using SVGs as scroll animation targets.
- SVGs mount read/writes are now batched.
- New function syntax for
useTransform
.
- Improved handoff animation performance.
- Numerical CSS variables are now read correctly.
- Replacing
requestAnimationFrame
timestamp withperformance.now()
to avoid timestamp bug in Chrome.
- Updated types for public
inView
API.
scroll()
now accepts animations fromanimate()
to create hardware-accelerated animations.
- Removed animation resync for optimised animation handoff.
- Fixed offset not working with useScroll.
- Fixed subpixel layout rounding in Chrome.
scroll()
, a universal API for powering scroll-driven animations viaScrollTimeline
.
- Fixing subpixel layout support in Webkit.
- Supporting subpixel layouts in layout animations.
- Transforming values if new values have been read from props.
- Fixing race condition with animation
Promise
. - Attempt to read initial animation from props before reading from DOM.
- Fixing unit conversion for
translateX
/translateY
.
- When layout animation is forced to be instant via
useInstantTransition
, ignore the delay option.
- Fixing
useInstantTransition
when called on subsequent frames. - Fixing reverse animation with negative speed finishes too early when the time is set to the duration.
- Fixing unit conversion when animating
translateX
/translateY
.
- Fixed timing bug when mixing
layout
prop andanimate()
. - Removing errant log from
resolveConstraints
.
- Ensure new
layout
components animate correctly on the first re-render.
- Fixed scale correction in elements that have finished layout animations.
- Ensuring zero units like
"0px"
can be used as keyframe templates.
- Fixing ending layout animations immediately on resize.
- Fixing persisting
AnimatePresence
child when exit animation is interrupted.
- Fixing jumpy layer when a layout changes after a pending animation has been scheduled.
- Moving layout animations to
queueMicrotasks()
, ensuring layout animations don't fire until all synchronous effects have executed.
- Improve handling of
"none"
keyframes.
- Fixing relative layout animations when mixing
type: false
andtype: "tween", duration: 0
.
- Exporting
visualElementStore
for internal use.
- Fixing types for
attrX
,attrY
andattrScale
values.
- Fixing CSS variable interpolation inside complex strings.
- Support for
attrScale
. Animate thescale
SVG attribute.
- Creating
sync
andcancelSync
as legacy APIs for use within Framer.
- Exporting
frame
andcancelFrame
as a public API.
- Fixed performance regression introduced with previous fix.
- Propagating relative nodes in layout animations.
- Fixing optimised transform animations.
- Calling
.play()
on finished animations now correctly restarts them.
- Fixing WAAPI offsets with springs in animation sequences.
- Adding springs to animation sequences.
- Fixing "keyframes must be of same type" error with some animation
- Adding
.duration
toanimate()
. sequences.
- Removing log from
useSpring
.
- Improving scroll animation startup time.
- Fixing animation scope with animation sequences.
- Recalculating and rerendering relative targets when layout is remeasured.
- Animation sequencing.
- Fixed use of multiple easing functions with WAAPI animations.
- Fixing
from
option instagger()
.
- Fixing
duration: 0
animations never ending.
- Further loosening
animate()
overloads.
- Loosening
animate()
overloads.
stagger()
- SVG and SVG path types for
animate()
.
- Default transitions no longer need to be namespaced under
default
.
- Complex string types interpolate correctly with WAAPI spring easing.
cancel()
,complete()
andspeed
toanimate()
.
"easeIn"
,"easeOut"
and"easeInOut"
easing functions are now WAAPI spec-compliant.
.stop()
stops animations permanently.useSpring
timing.animate()
withrepeat: 1
andrepeatType
"reverse"
or"mirror"
correctly applies final keyframe.
useAnimate()
provides a composable way to useanimate()
.
animate()
now supports DOM elements and DOM selectors.
- Updating README.
- Using frame timestamp, when available, to sample time.
- Applying target CSS variable at the end of animation.
- Fixed
time
Promise
on instant animation.
time
,play()
,pause()
andthen()
to animations created withanimate()
.
- Adding de-opt to projection tree when relative target has changed.
- Refactored
animate
to resolve fortime
instead oftimeDelta
.
delay
will now apply to"inertia"
animations.
- Unifying
AnimationPlaybackControls
types. - Changing
Feature
type to fix Next build errors.
- Restoring
DeprecatedLayoutGroupContext
for legacy Smart Components in Framer.
- Passing low
restSpeed
andrestDelta
touseSpring()
.
- Vanilla JS entry point
framer-motion/dom
.
- Frame-batched event handlers. This means external event handlers are now batched on the next animation frame, allowing React to correctly batch state updates.
- Fixing "Non-numeric
offset
" error in older browsers.
- Reducing keyframe pregeneration duration by 75%.
background-color
animations are now hardware accelerated.
- Removing fallback for
IntersectionObserver
. Use a polyfill for support in older browsers. - Removed
DeprecatedLayoutGroupContext
.
- Using
exitBeforeEnter
withAnimatePresence
now throws an error. - Using
value.onChange
will now throw a warning with instructions to change tovalue.on("change", callback)
. - Using
AnimateSharedLayout
now throws an error.
repeat: Infinity
no longer de-opts from pre-generated WAAPI animations.
- Switching
const enum
for types.
- Exporting
scroll
for internal use inside Framer.
- Changing
Feature<any>
toFeature<unknown>
.
- Fixing types of
useScroll
.
- Limiting propagation of dirty projection nodes for improved layout animation performance.
- Replacing
type enum
withconst enum
for smaller bundlesize.
- Removing external dependencies.
- Hardware acceleration of
clipPath
,filter
andtransform
styles.
- Improving types of
color.parse()
.
- Exporting animation types for internal Framer use.
- Adding legacy Popmotion exports for internal Framer use.
- 25% speed improvement for transform string creation.
- Refactored
motion
component features to load without React components. - Deprecated fallback behavior for missing
IntersectionObserver
.
Reorder.Item
no longer throws an error withinMotionConfig strict
.
- Tap events no longer suspend
tabindex
attribute for the duration of the gesture.
- Tap events are now keyboard accessible.
whileFocus
only triggers according tofocus-visible
rules.
- Ensuring
Animation.cancel()
is called on finished WAAPI animations.
- Reducing size of prop filtering.
- Manually recording optimised appear
startTime
to fix inaccuracies of Firefox'sAnimation.currentTime
.
- Updated optimised appear animations to defer animations until Chrome releases paint holding.
- Changed
restSpeed
andrestDelta
defaults for granular spring animations.
layoutRoot
prop. When component haslayout
andlayoutRoot
props, it will perform layout animations instantly but all children will perform layout animations relative to it.
- Fixed right-click filtering.
- Fixed WAAPI deoptimisation with layout animations.
- Reduced number of animations triggered for components that have gesture event handlers but no corresponding
while-
props.
- Only trigger
animateChanges
in auseLayoutEffect
when optimised appear animations are present. - Resync optimised appear handoff animations before cancelling WAAPI animations to ensure seamless visual handoff.
- Filtering
values
prop.
- When in Reduced Motion mode,
transition
no longer overrides instant transitions.
- Events sourced from
pointercancel
no longer being added to pan gesture history.
delay
no longer getting doubled with pregenerated WAAPI keyframes.
- Exporting
frameData
andsync
for internal Framer use.
- Detection of hex colors with alpha values within complex strings.
- Stop filtering
pen
hover events.
- Allow
useMotionTemplate
to accept static values.
- Memoisation of tap callbacks.
motion
components can accept aMotionValue
aschildren
.
- Stop applying scale correction to an element's styles when there's no active projection transform.
- Improved memoisation of internal event handlers.
- Removed ability to trigger animations via
useAnimationControls()
during render lifecycle. This would be a source of silent or subtle errors.
- Variant
transition
fixed in Motion 3D.
- Exporting easing functions.
- Preventing infinite keyframe pre-generation.
- Sampling of animations with delay/repeat settings when interrupting WAAPI animations.
- Swapping
style
value betweenMotionValue
and static value.
- Minification of
process.env.NODE_ENV
.
- Display warning in development mode when Reduced Motion is enabled on device.
- Ensuring child variant components fire
onAnimationStart
when an animation is triggered by a parent.
- Fixed
times
.
- Fixed
extends
error inLayoutCamera
andLayoutOrthographicCamera
components.
- Fixing error when
Transition.type
is invalid.
MotionValue.jump
can be used to "jump" aMotionValue
to a new value, bypassing active springs, ending current animations and resetting tovelocity
to0
.
- Cleaning up animations when a
MotionValue
has no active"change"
subscribers. - Changing
useMotionValueEvent
subscription touseInsertionEffect
.
- Use range for tslib dependency.
- Fixing multitouch with drag and pan gestures.
- Fixing defaults for hardware-accelerated animations.
- Warning for unhydrated refs passed to
useScroll()
options.
- Removed polyfilled support for mouse/touch events.
- Removed drag pointerup patch for Safari over
<select />
elements.
DragControls.start
now acceptsPointerEvent
only.
- Firing
animateChanges
inuseLayoutEffect
rather thanuseEffect
to ensure optimised appear animations are handed off before paint.
- Adding support for all easing functions with WAAPI.
- Fixed type inference of
useMotionValueEvent
.
.on()
event method toMotionValue
."animationStart"
,"animationComplete"
,"animationCancel"
and"change"
events forMotionValue
.useMotionValueEvent
helper method for adding events.
- Fixing mapping Motion easing names to WAAPI.
- Hardware-accelerated
opacity
animations.
- Refactored animation pipeline to better accomodate WAAPI.
- Hardware-accelerated
opacity
animations.
- Refactored animation pipeline to better accommodate WAAPI.
- Added private APIs for starting initial animations before React hydration and handing off to the component after hydration.
- Fixed spring effect of
useSpring
.
- Reduced
??
operators to reduce bundlesize.
- Removed
style-value-types
andframesync
as external dependencies.
- Added support for
"startOffset"
,"textLength"
and"lengthAdjust"
SVG attributes.
- Removed ability to define
"inertia"
animation as"decay"
(officially removed in3.0.0
).
- Removed legacy repeat options (officially removed in
3.0.0
).
- Animation of
viewBox
for SVG elements.
- Removed
popmotion
as external dependency.
- Manually firing callback with latest callback when
useOnChange
is provided new motion value (affectsuseSpring
).
- Fixing
useOnChange
to resubscribe when provided a new motion value (affectsuseSpring
).
- Rounding tree scale to
1
to prevent unnecessaryscale
transforms.
- Nothing to see here.
isTransformDirty
node skipping logic.
- Treat
<motion.svg />
components as HTML.
- Further layout animation performance enhancements.
- Removing read of (currently unused)
position
style as it's erroneously breaking a test in Framer.
- Only updating projection calculations for dirty nodes.
- Reducing number of scroll reads during layout animations.
- Removed instantiation of externally-provided motion values.
- Minor layout animation refactors.
VisualElement
changed toclass
implementation.- Fixed issue with relative layout animations when switching relative parents.
- Updated
buildTransform
types to only expect required arguments.
- Exposing
buildTransform
for internal use.
- Internal option for
useScroll
to useuseEffect
instead ofuseLayoutEffect
.
- Exporting
CycleState
andCycle
types.
delay()
: An alternative towindow.setTimeout()
that is locked to the animation framerate.
- Fixed bug relative layout animations within rotated layers.
- Fixed bug with
layout="preserve-aspect"
where layers that do change size but aren't moved are reprojected to the old size and stay there.
- If the initial style was derived from the
initial
prop, and that style is removed fromanimate
, while also being removed frominitial
, it won't animate back to the originally-defined value.
- Gracefully handle
undefined
values invalues
prop.
useTransform
correctly cleans up any scheduled animation frames when it unmounts.
useAnimationFrame
now passesdelta
to provided callbacks as the second argument.
- Added internal
values
prop that allows the provision of motion values to use exclusively for performing animations on.
- Increasing threshold for what's considered a similar aspect ratio in
"preserve-ratio"
layout animations.
isMotionValue
no longer crashing when providednull
.
- Run feature detection based on rendered props.
- Ensuring children dynamic components re-render when context changes.
isMotionComponent
returns true if the provided component is amotion
component.unwrapMotionComponent
returns the rendered component.
- Fixing application of
rotateZ
.
layout="preserve-ratio"
performs a position-only transition if the aspect ratio has changed.
layout="position"
now works with shared element transitions.
- Various filesize reductions.
AnimatePresence
's newmode="popLayout"
prop will "pop" exiting elements from the document layout flow, allowing siblinglayout
elements to animate to their new layout as soon as exiting starts.
exitBeforeEnter
- replace withmode="wait"
.
- Fixing
useWillChange
export.
- Upping TypeScript output
target
to"ES6"
.
typescript@4.7
useWillChange
for automatically managing thewill-change
style.
- Trimming CSS vars.
- Correctly parsing slash-delimited opacities within colors.
- Exporting types correctly for Typescript 4.7.
- Replacing internal
useId
with React 18'suseId
.
react@18
react-three-fiber@8
- Drag to reorder items no longer jumping in React 18.
- Fix types for
mixer
option inuseTransform
.
style-value-types@5.1.0
- Adding
onChange
handlers inuseTransform
onuseLayoutEffect
.
useScroll
for creating scroll-linked animations.
useViewportScroll
anduseElementScroll
.
- Split module to improve ability to code-split and tree-shake
<m>
anddomMax
.
useInView
now automatically respectsrootMargin
within an iframe.
- Renaming
useAnimation
touseAnimationControls
.useAnimation
will stay as backwards compatible alias.
useInView
.
- Fixing layout animations within
position: fixed
elements. Provideposition: fixed
elements thelayoutScroll
prop to fix.
- Explicitly declaring
children
prop for components.
- Exposing more internal types.
- Fix some missing types by replacing
@internalRemarks
comment with@privateRemarks
.
- Rolling up published type definitions.
- Fixed scale correction during rotation & layout animations.
- Fixing version mismatch warning.
- Providing path to types via
package.json
'sexports
field to fix types in TypeScript 4.7. - Safer
process.env.NODE_ENV
check.
- Restore scroll position after measuring
height
when doing unit conversion animation.
- Will display a warning if different versions of Motion are mixed.
- All events are now passive unless a user provides an explicit event listener.
- Added
initial
prop to Motion 3D types.
- Updating
reducedMotion
prop inMotionConfig
now correctly updates throughout the tree.
- Re-enabling layout animations on
svg
elements.
- Fixing internal type errors in React 18.
- Adding deprecation notice to
AnimateSharedLayout
.
- SSR in Deno.
- Adding
layout
prop toReorder.Item
. onLayoutAnimationStart
.
- Ensure
cycle
is properly memoised.
- Fixed
useSpring
dependencies if properties change between renders. - Fixed
children
types ofAnimatePresence
andLayoutGroup
.
- Fixing
process
in ESM environments.
- Fixing race conditions for variants changed by state vs by gesture.
- Replaced undocumented
LayoutGroup
propinheritId
withinherit
.
- Remove
useId
from React 18.
- Improving compatibility with React 18.
- Fixed layout animations with Framer's
Stack
gap Safari polyfill.
- Adding
useReducedMotionConfig
for internal Framer use.
- Fixing
onBeforeLayoutMeasure
.
- Ensure
useReducedMotion
detects reduced motion on load.
reducedMotion
option toMotionConfig
.
- Added
viewport.fallback
option to disableIntersectionObserver
polyfill.
framer-motion/three
is nowframer-motion-3d
.
isValidProp
prop toMotionConfig
that allows the injection of custom detection of valid React props.
- Removing
transformTemplate
prop correctly rerenders element.
- Fixing crossfade for % or px unit border radius. Issue
MotionConfig
propagates changes to transition.
- Using
dpr
prop in layout animation calculations.
- Improving performance of
LayoutCamera
. - Removing
data-projection-id
in static mode.
- Improving performance of
LayoutCamera
and fixing final flash.
- Reimplemented dynamic resolution scaling for
LayoutCamera
.
- Removed dynamic resolution scaling from
LayoutCamera
to fix crash in iOS.
LayoutCamera
andLayoutOrthographicCamera
.
- Passing
MotionConfigContext
through from DOM into 3D.
- Fixing variant animations across DOM and 3D boundaries via
MotionCanvas
.
- Fixing export paths. PR by @edoardolincetto.
- Sharing
MotionContext
across Motion and Motion 3D environments in CommonJS environments.
- 3D entry point overwriting ES modules with dropped exports.
useAnimationFrame
- Fixing animating to CSS variables with
SVGElement
. Issue - Unsetting
z-index
for restingReorder.Item
components. Issue - Forward native drag listeners to
draggable
elements. Issue - Authors can now support browsers without
Proxy
by usingmotion("div")
syntax. Issue
- Ensuring forced renders are batched so sibling
AnimatePresence
renders are triggered together. Issue - Viewport enter/leave event handlers are passed
IntersectionObserverEntry
ornull
ifIntersectionObserver
is not supported on the device. Issue - No longer applying touch scroll-disabling styles if
dragListener
is set tofalse
. Issue
useInstantTransition
hook for internal use.
- Removing
layoutDependency
from forwarded props. Issue Reorder.Item
correctly firesonDrag
. Issue- Fires
onPressStart
andonHoverStart
after triggering animations. - Replay keyframes when variant changes. Issue
- Correctly SSR final keyframe when
initial
isfalse
.
whileInView
,onViewportEnter
andonViewportLeave
props.
- Fixing unit conversion for
x
andy
styles. Issue
- Enable animation between hsla and rgba/hex.
- Fixing HSLA color interpolation. Issue
- Adding path drawing support for
circle
,ellipse
,line
,path
,polygon
,polyline
andrect
components. - Add SSR support for
pathLength
.
- Fixed SSR for
pathLength
. - Downgrading
whileFocus
to lowest gesture priority. Issue - Fixed path length for elements with
vectorEffect="non-scaling-stroke"
Issue - Stripping
dragSnapToOrigin
from DOM output. PR by @Evalon
- Convert x/y from percent to pixels before drag. Issue
- Dynamic functions passed to
controls.start()
can now return variant names. Issue - Factors in padding when measuring elements for
width
/height
unit conversion. Issue
onAnimationStart
is now called with the definition of the triggering animation.
- Removing context memoisation to ensure removed values are correctly animated to.
- Adding unmount check to
AnimatePresence
before updating state. PR by @ctrlplusb - Fixing types for multi-input
useTransform
. PR by @kena0ki - Fixing
staggerChildren
for value-specific transitions. Issue - Fixes animation between
0
and non-number/pixel keyframe array. Issue
Reorder
components to create drag-to-reorder interfaces.LayoutGroup
allows namespacinglayoutId
and group elements that may affect each-other's layout on re-render.layoutDependency
prop to restrict when components are measured.layoutScroll
prop to hint to layout animations when a element is scrollable.- Layout animations are auto-completed when the viewport resizes.
layout="size"
for size-only animations PR by @bhollis.
- Various layout projection improvements.
AnimateSharedLayout
is deprecated.
- Fixing SVG
gradientTransform
. - Removing hover event suspension during layout measurements.
- Use with changing external refs.
- Correctly firing
onAnimationComplete
when a spring animation defined bybounce
and noduration
is completed.
- Narrowing the edge cases within which drag could lock the projection viewport box.
- Comparing prev scale to correct axis.
- Call function ref if it changes between renders.
- Layout measurements for drag gesture don't happen until the gesture is confirmed to start.
- Prevent occasional flash when projection hasn't yet been hydrated.
- Unifying layout batcher between drag and layout animations.
- Suspending hover events globally during layout measurements.
- Layout projection fix.
- Allow a component to have
transform
reset before measuring child layout.
- Further nested drag improvements for external motion values.
- Nested drag improvements for external motion values.
- Nested drag improvements.
- Nested drag improvements.
- Layout projection improvements.
- Disabling hover events when a drag is active.
- Animating to/between
0rem
and other non-specifically handled unit types.
- Clamping
borderRadius
to0
and above during crossfade.
- Animating from
undefined
to number (including units) now animates from0
.
- Relative layout animations
- Adding
transition.crossfade
andtransition.layout
for crossfade and layout-specific transitions.
- Various layout projection improvements.
- Replaced layout animation tree traversal with flat array traversal of just projecting elements.
- Various layout animation bugfixes.
- Upgraded
popmotion
,framesync
,style-value-types
andtslib
tolatest
.
- Adding
package.json
toexports
so it can be imported by Node.
- Added the new
LazyMotion
component to defer the loading of animations and gestures.
- The deprecated
motion.custom()
. Usemotion()
instead.
- Various variant bugs.
- Added specific
default
andrequire
fields to theexports
field for CJS compatibility.
exports
field topackage.json
.
useMotionValue
now forces re-render on the Framer canvas when the underlyingMotionValue
updates.
- Reduced memory consumption in static mode by not loading
VisualElement
.
- Improved memory consumption of
SubscriptionManager
.
- New layout animations now only trigger when the target viewport box has changed.
useVelocity
.
- Exporting
AnimationPlaybackControls
andAnimationOptions
foranimate()
. - Fixed passing dynamic function to
controls.start()
.
- Crossfader now only returns values for the lead and follow components.
- Drag now passing velocity to
useSpring
correctly.
dragElastic
now accepts per-axis elastic settings.
perspective
now correctly set as its ownstyle
.transformPerspective
still builds intotransform
.
- Refactoring
AnimationType
is improve bundle-splitting.
- Code-splitting for Webpack.
motion()
creates custommotion
components.forwardMotionProps
boolean to optionally forwardMotionProps
to custom components.
- Custom
motion
components no longer forwardMotionProps
by default.
motion.custom
- Listing React 17 as a
peerDependency
.
- More permissive check for previously-unencountered values.
- Safer
hasOwnProperty
check fornull
values.
- Only fire
onPanEnd
ifonPanStart
has triggered.
- Adding polyfill
performance.now
inframesync
.
- Only crossfading defined
borderRadius
borders during shared element transitions.
AnimatePresence
now correctly unmounts children if it contains nomotion
components.
onAnimationComplete
on child variant components now fire as expected.
onAnimationComplete
now provides the definition of the triggering animation.
- Fixing bug with
afterChildren
andexit
animations.
- Setting
sideEffects: false
inpackage.json
to help code splitting in Webpack.
onTapCancel
is now being correctly cleaned up.
- Adding
transition
prop toMotionConfig
to set a defaulttransition
for an entire tree.
onBeforeLayoutMeasure
prop, currently a Framer internal.
- De-duplicating features in nested
MotionConfig
s to avoid key error.
- Main
motion
component concurrent-safe.
- Crossfading elements can now never fall out of positional/style sync due to mismatched animations or framelag.
- Fixing SVG double translation transform (props + transform style).
animate
onComplete
now firing correctly.- Only firing keyframe animation when all values have changed.
- Removing forced re-renders for variant trees.
- Variant stagger order now determined by DOM APIs.
- Fixed default spring for
scale
,opacity
etc from being overdamped to being critically damped when animating to0
.
- Fixing errant publish.
- Exporting
useVariantContext
for internal Framer use.
- Support for hex
alpha
, ie#FFF0
and#FFFFFF00
. - Support for default
filter
values. For example, when animating frombrightness(50%)
, the animation will start frombrightness(100%)
rather thanbrightness(0%)
.
- Hover events are now blocked while layout is being measured.
- Blocking layout animations to/from zero bounding boxes.
onTapCancel
now fires correctly on touch screens.createDomMotionComponent
types.
- Fixed types for
pathSpacing
andpathOffset
.
snapToCursor
respects drag axis.
- Updated dependencies.
whileFocus
- Error when mixing
initial={false}
andanimate={controls}
.
whileDrag
- Adding Safari-prefixed
userSelect
css to draggable elements. whileHover
,whileTap
andexit
all now accept variant lists.
- New behaviour for when values are removed from animation props (
animate
,whileHover
,exit
etc). The value will be searched for in active props of a lower priority running (style
<-animate
<-whileHover
<-whileTap
<-whileDrag
<-exit
). This may introduce subtle behavioural changes, hence the major.
- The deprecated
useInvertedScale
hook. Use thelayout
prop instead. - The deprecated
yoyo
,flip
andloop
options. Userepeat
andrepeatType
options instead.
- Correctly applying
transform
on SVG elements. - Lazy-initialising viewport scroll, VisualElement.axisProgress, and reduced motion
MotionValue
s, for increased startup performance. - Improved measurement scheduling for
drag
components and nestedAnimateSharedLayout
trees. - Robust calculation of
treeScale
.
- Updating
package.json
to be compatible with React 17.
- Exporting internal API
startVisualElementAnimation
for use in Framer.
- Exporting
Target
type.
- Over-eager variant propagation.
- Reverting
matchMedia
listener to legacyaddListener
to fix in Safari.
- Refactor has reduced complete bundle size to 27kb and
m
component bundle size to 12.5kb.
- Removing whitespace from resolved CSS variables.
animate
function for low-level singleMotionValue
or arbitrary value animations.
- Reverting previous behaviour to allow manual triggering of updating drag constraints via
useDragControls
.
- If
dragConstraints
is set to a ref on a non-draggable component, we resolve the constraints on mount in order to pass them toonMeasureDragConstraints
.
duration
andbounce
are now overridden bydamping
,stiffness
, andmass
. This fixes an issue in Framer where legacy transitions were breaking.
- When a
transform
is provided tostyle
as aMotionValue
and then replaced with a number on a subsequent render, we create a newMotionValue
for it.
- Manually setting a
from
intransition
.
- Blocks propagation of variants from parent if a component's
animate
prop is set toAnimationControls
.inherit
can be used to force inheritencetrue
orfalse
.
- Blocks touch viewport scrolling from draggable components on a per-axis basis.
- Reinstating
sideEffects: false
now that theblockViewportScroll
method has been removed.
createDomMotionComponent
for legacy browser support.
- Reverting
sideEffects: false
, as viewport touch scroll blocking is a side effect.
- Duration-based springs.
- Fixing dynamic type imports in generated types.
- No longer unsetting transform motion values from
style
if their current value is0
. - Correct
useDomEvent
types to allow anyEventTarget
. - Fix memory leak error in
AnimatePresence
.
- Added
sideEffects: false
topackage.json
. - Added
bundlesize
bundle budgeting.
drag
+layout
components no longer reset position to center.
- Reduced full bundle size by 0.8kb by replacing
import * from "popmotion"
with a named map of specifically just the easing functions.
- Reinstating default keyframes duration of
0.8
seconds.
dragElastic={0}
gesture end animations now work correctly.
- Ensure
AnimatePresence
children re-render when children exit.
- Ensure useTransform uses the latest handler.
- Scale correction for
borderRadius
andboxShadow
found instyle
. - Fixed conflict between
initial
andstyle
.initial
will now take precedence on initial render. - Support for CSS variables in scale-corrected
boxShadow
styles.
- Correctly mapping
times
option to Popmotion'soffset
.
- Tweaked
restSpeed
defaults for smoother halting of physical (px) springs.
- Critical-damped spring equations in Popmotion.
- Forcing array targets to use keyframes animations.
- Coercion to type
auto
.
- Fixing detection of transition definitions and application of default transitions.
- When animating to/from
0
and a unit type,0
will be coerced to that unit type rather than needing unit conversion via DOM measurement.
- Updating
useDragControls
documentation to reflect that triggering events should beusePointerDown
, as mouse events work differently on touch screens. AnimatePresence.custom
is passed throughout the tree for all exit variants.- Animating the
viewBox
attribute ofsvg
elements now correctly sets theviewBox
attribute instead ofview-box
.
- Typescript 4.
- Reverting relative
dragConstraints
resolution that was erroneously changed in2.1.3
.
- Tweaked
restDelta
inpopmotion@9.0.0-rc.7
for smootheropacity
transitions.
- Fixed jumpy drag transitions resulting from existing animations not being correctly stopped.
- Improved velocity check for underdamped springs.
- Drag transitionEnd conflicting with layout animations.
- Occasional glitchy movement with
type: "spring"
andrepeatType: "mirror"
- New repeat syntax
- Support for repeated springs
- Fixed support for
null
in keyframes animations. - Fixed
delay
propagation.
- Upgrading to Popmotion 9 RC.
- Adding defensive check for
visualElement.box
inMeasureLayout
.
- Upgraded
useTransform
to accept multipleMotionValue
s. - Support for
transformPerspective
style. - Internal:
_dragX
and_dragY
externalMotionValue
targets for drag gesture. - Internal: Support for rotate in
AnimateSharedLayout
within Framer. - Internal:
onViewportBoxUpdate
,onLayoutMeasure
andonLayoutUpdate
event handlers added toHTMLVisualElement
.
- Fixed
AnimateSharedLayout
within React17.0.0-rc.0
. - Drag now works directly on
x
andy
transforms unlesslayout
orlayoutId
are also set.
- Marked
useInvertedScale
as deprecated.
useMotionTemplate
, a hook for combining MotionValues using a string template literal.
m
component is a lightweight, featureless version of themotion
component.MotionConfig
is used to dynamically provide features tom
components via context.
- Drag Cypress test suite.
- Application of relative drag constraints.
- User-set transforms were only updating when layout transforms updated.
- Fixing drag on SVG components.
- HSLA interpolation when either HSLA contains a decimal.
- Whitespace-syntax color support.
onLayoutAnimationComplete
now firing correctly.
- Respecting
transformTemplate
for layout animations. - Fixed
this.box is undefined
errors.
- Internal refactoring to improve tree-shaking and allow for dynamic feature injection.
- Performance improvements to layout delta calculations.
layout="position"
for position-only layout animations.
- Fixed issue with draggable components staying stuck when they're getting render-thrashed.
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.
positionTransition
andlayoutTransition
props (uselayout={true}
instead).Point
type in favour ofPoint2D
.useAnimatedState
: Moved to Framer library.dragOriginX
,dragOriginY
props.stylefire
as a dependency.
- Removing a
MotionValue
fromstyle
now correctly unsets it from the element.
- 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)
- Using
useIsomorphicEffect
foruseElementScroll
anduseViewportScroll
.(@thebuilder in #592)
- Added a
useElementScroll
hook that allows the creation of scroll motion values for HTML elements. (@souporserious in #195)
- Replacing the functionality of
DragControls
e.preventDefault()
with CSS and HTML attributes. (@inventingwithmonster in #495)
- Fixing
PresenceChild
losing correct count of exiting children if it re-renders. (@inventingwithmonster in #490)
- Removed developer warning when using
usePresence
outside of anAnimatePresence
block.
- Fixing
AnimatePresence
children not re-rendering when their exiting siblings have been removed from the tree (which broke siblingspositionTransition
andlayoutTransition
). (@inventingwithmonster in #489) - Adding
null
check forgetTranslateFromMatrix
(@JoyalJoyMadeckal in #482)
AnimatePresence
now supports multipleusePresence
children within a given sub-tree.
- Ensuring drag momentum animations happen on
_dragValueX
and_dragValueY
if provided. (@inventingwithmonster in #473)
usePresence
hook. (@inventingwithmonster in #473)repository
field inpackage.json
. (@iamstarkov in #469)
dragListener
prop to disable drag event listeners.
- Updated documentation for
DragControls.start
.
- Downgraded
api-extractor
to@7.3
as7.7.7
brokeMethod
name indexing.
- Updated documentation for
useDragControls
.
useDragControls
allows imperative initiation of a drag gesture.
- Updated
transformTemplate
to provide an empty string if all transform values are default.
- Changed definition of
staggerDirection
from1 | -1
tonumber
to reduce the need for casting externally-defined types.
- Added support for
TargetResolver
inexit
types.
- Filtering
onAnimationStart
from forwarded props.
- Support for
prefers-reduced-motion
via theuseReducedMotion
hook.
- Various
StrictMode
-related bugs includinglayoutTransition
origin calculation. - Only applying drag constraints during a
useEffect
to allow render-triggered animations a chance to start (thereby blocking the application of constraints).
controls.set
can now accept a function that will resolve once for each child.
- Fixing
ref
hydration inuseLayoutEffect
. (Note: This release effectively reverts1.6.10
. Each child ofAnimatePresence
with a uniquekey
should be given a uniqueref
). - Moving callback ref mutation in
use-drag
anduse-pan-gesture
to auseEffect
.
- Quick start section to README.
- Making position change detection more intelligent.
- Fixing undefined
this.props
error forAnimatePresence.exitBeforeEnter
.
- Support strings in
motion.custom
for Web Component support.
- Inconsistency in handling
x
/y
between SVG and HTML. Now always a shorthand fortranslateX
andtranslateY
.
- Fixing the use of externally-provided
ref
s with single-childAnimatePresence
components.
- Exit variant propagation.
- Cancelling exit animations.
- Fixed exit animation when
animate={useAnimation()}
. - Fixed exit animations when another animation is playing concurrently and finishes first.
- Upgrade
stylefire@6.0.11
to fixclipPath
in Webkit. - Allow
motion.custom
to accept custom prop types. - Support clicks within draggable components on iOS Safari.
- Making
inherit
public API.
- Restoring React-style behaviour for transform
style
properties when a componentisStatic
.
- Adding
@emotion/is-prop-valid
as an optional dependency to ensure we filter out arbitrary props passed along by Emotion and Styled Components.
- Value-specific
delay
.
stylefire@6.0.10
- Ensuring
onDragEnd
always fires after ifonDragStart
fired.
- Invalid property in SVGs.
- Making
useInvertedScale
public and changing const to function.
layoutTransition
EventInfo
now passed as second argument toonHoverStart
andonHoverEnd
.useDomEvent
hook for attaching events directly to anElement
.
- Simplifying event system.
- Applying values in
animate.transitionEnd
if not initial animation. - Made drag constraints only apply if a value isn't animating.
- Don't throw error if
useInvertedScale
is provided arguments.
useInvertedScale
for inverting parent scales.
positionTransition
on exiting components withinAnimatePresence
.
- Pan and drag gestures with
PointerEvent
.
AnimatePresence.exitBeforeEnter
.- Added explicit support for custom components as children of
AnimatePresence
.
- Fixing issue with drag constraints (ref-based) being reset, while dragging, on unrelated parent component updates.
- Updated rollup config to list
tslib
as an external dependency. - Ensuring unmounting components don't call
onAnimationComplete
. - Adding error message when no initial value is set, or can be read or inferred.
- Ensuring color alpha is always within bounds.
- Ensuring variants propagate on unmount.
- Added
onAnimationStart
.
- Make sure
select
,input
,textarea
loose focus when blocking default behaviour in a draggable element.
- Value type conversion for currently-hidden elements.
- Fixing unit type conversions when non-positional transforms are applied.
- Fixing variant propagation via
useAnimation()
when the parent component has novariants
prop set. - Fixing unsetting
whileHover
andwhileTap
if they containtransitionEnd
values. - Child components within variant trees now animate to
animate
as set by their parent. - Checking animation props for array variants as well as strings.
- If unencountered value is animated, first attempt to extract an initial value from keyframes definition. Also upgrading
stylefire
to gracefully handle transform requests.
isValidMotionProp
function.
- Improving types for
SVGTextElement
components.
- Don't load
positionTransition
functionality component server-side. - In development mode, ensuring all child keys are unique.
- Typescript to
3.5
.
- Removing re-entering children from exiting list in
AnimatePresence
.
- Supporting
positionTransition
as a function that resolves when the component has moved. - Adding
dragOriginX
anddragOriginY
props.
- Excluding
positionTransition
from SVG type.
- Exporting
AnimatePresenceProps
.
- Fixing
positionTransition
on server-side.
- Upgrade to
AnimatePresence
algo.
- Moving UMD global from
FramerMotion
toMotion
. - Removed
@emotion/is-valid-prop
, saving ~1.9kb from bundle. - Using a slimmed-down version of Popmotion, saving ~3kb from bundle.
- Removing
async
markers, saving ~0.7kb from bundle.
- Cancelling
drag
andpan
gestures on component unmount. - Previously unseen props in
animate
animate correctly. - Fixing reading SVG attributes from DOM.
- Fixed unit type conversion not working with previously-undefined values.
- Calling
onAnimationComplete
whenwhile
overrides are unset. - Preventing initial animation if
animate
is a map of props andinitial={false}
. This went previously unseen as both values were equivalent, butonAnimationComplete
would fire on mount.
AnimatePresence
component for controlling mount/unmount animations.positionTransition
prop for animating when the layout of a component changes.
- Fixing SVG path props.
- Moving SVG path props to
MotionStyle
type. - Changing
MakeMotion
to accept eitherMotionValue<string>
ORMotionValue<number>
.
- Moving
dragConstraints
to a ref if a component re-renders mid gesture. - Only applying
dragConstraints
on render if component isn't currently dragging.
- Making
when
type more permissive for passing in implicitly typed, pre-definedvariants
. - Not blocking default browser behaviour when dragging is initiated on draggable element's
select
,input
,textarea
elements.
- Fixing
useSpring
unsubscriptions.
- Improved SVG support.
- Ensuring each
MotionValue
receives oneMotionValuesMap
update subscriber.
- Adding
x
/y
MotionValue
s to theuseDrag
dependency list. - Ensure hover events only fire as a result of mouse interactions.
- Allowing SVG
motion
components to acceptMotionValue
s via attributes. - Adding SVG attribute types to
Target
.
- Detecting
originZ
as atransform-origin
value.
initial={false}
to shadow contents ofanimate
thereby disabling on mount animation.AnimationControls.set
for imperative setting of values.
- Resolve animations only after a defined
delay
to ensurevelocity
is only resolved as an animation begins on a value.
stylefire@5.0.0
- ChangesoriginX
/Y
default to"50%"
.
- Production and prototype environment-specific tsdocs.
- Properly cleaning up event listeners in tap gesture.
- Only starting pan gesture when pointer has moved more than one point.
- Applying
transformPagePoint
todragConstraints
when it's aRefObject<Element>
to ensure it works in scaled environments. - Fixing
dragElastic
behaviour whendragMomentum={false}
.
- Preventing default browser behaviours on draggable elements.
- Fixing drag when a multitouch gesture starts.
- Application of
delay
.
- Fixed regex detection for fallbacks containing a decimal.
dragConstraints
can now be set as aReact.RefObject
.
- Support CSS variables with metadata
- Fixing circular CSS dependencies
- Even if a
motion
component wasn't inheriting variant changes, it'd still register with its parent, meaning it'd be considered during stagger duration calculations. - Only firing
onDragEnd
if dragging has actually happened.
dragTransition
now listed as auseDraggable
dependency.
- Experimental
useAnimatedState
Hook for animating arbitrary values.
- Disabling the animation of
zIndex
. - Making components without variants or animation-controlling props invisible to
staggerChildren
.
- API
- Variant propagation when rerendering children
- Using
transition
andtransitionEnd
as direct values on theanimate
prop on subsequent renders. - Rounding
zIndex
. AnimationControls.start
now accepts the sameAnimationDefinition
asValueAnimationControls.start
.
- Cancelling pan gesture when the move events have no mouse button.
- Fixing propagation of unsetting variant overrides.
- Making variant inheritance more permissive.
- Improved handling of attempting to animate between non-animatable and animatable values.
- Adds array and object support to
transform
.
- Makes boxShadow and other complex value type support more robust.
- Fixing overwriting
transform
.
- Updating deps.
shadow
toCustomValueTypes
.
- Fixed propagation of
initial
instatic
mode. - Fixing animations from values that are read as "none".
- Filtering pointer events not from the primary pointer (ie non-left clicks for mouse).
- Fixing drag in Android devices by adding aggressive viewport scroll blocking. This will need dialling back down when it comes to open sourcing Motion so, for instance, a horizontal carousel doesn't block vertical scrolling.
custom
prop for dynamic variants.
useAnimation
no longer takesvariants
ordefaultTransition
arguments (provide these to the component).
- Improving comparison for
animate
prop to account for keyframe arrays. - Adding drag point in
onDragStart
andonDragEnd
callbacks.
- Support for CSS variables.
onDragEnd
not returning transformed point.- Fixing use of
variants
prop withuseAnimation
.
HTMLMotionProps
andSVGMotionProps
.
onPanSessionStart
event handler.
useViewportScrollValues
=>useViewportScroll
.
ease
can now be an array for keyframes animations.
easings
prop.
- Only firing
value.onChange
when value actually changes.
- Updating
hey-listen
.
- Explicit support for the
radius
value.
- Making special value support configurable
useTransformedValue
=>useTransform
transform(value, input, output, options)
overload.
- Added new methods to
safeWindow
SSR window mocking.
- Deleting unused props from
style
object rather than setting toundefined
. #99
size
works withwhile
gestures.
useCycle([...args])
->useCycle(...args)
static
components reflect changes ininitial
.
- Dragging doesn't break during re-renders.
useCycle
setter is independent from render cycle.
useCycle
no longer has the ability to start at a different index.
onDragTransitionEnd
- Popmotion libraries.
value.addUpdateSubscription
=>value.onChange
value.addRenderSubscription
=>value.onRenderRequest
(and made internal)
popmotion@8.6.5
- Variants propagate to children even if not present on parent.
- Updating docs to avoid single-letter
event
vars.
- Fixing
TargetAndTransform
type to omit CSS-nativerotate
property.
press
->whileTap
hover
->whileHover
- Fixing HTML types.
- Exporting
MotionTransform
type.
- Added support for
CustomValueType
inunwrapMotionValue
.
- Added
dragDirectionLock
prop.
"lockDirection"
fromdragEnabled
.
- Renamed
dragEnabled
todrag
.
- Adding
transition
argument toanimation.start()
.
- No longer fire tap gesture if parent is dragging.
- Adjusting default
inertia
settings to more naturally incorporate velocity. - Killing drag momentum on subsequent
pressDown
. - Preventing pan velocity from adjusting draggable parents that have not received
dragPropagation
. - Updating of
dragConstraints
repositions the draggable element to adhere to the new values
Point.relativeTo
transform
- Statefull style bug.
- Fixing
Promise
resolution withanimate.start()
when fired pre-mount.
- Blocking extra gesture props from being passed to DOM.
- Upgrading
@popmotion/popcorn
to fix Jest bug.
- Fixing
style
set asnull
.
- Adding support for custom values.
- Updating tsdocs for
MotionValue
.
- Updating dependencies.
originX
,originY
,pathLength
,pathOffset
changed from percent to progress value types.
- Exporting
AnimationControls
.
- Exporting
animationControls
andmotionValue
for internal use.
- Passing
panInfo
through toonDragStart
andonDragEnd
.
easings
property onkeyframes
now maps correctly to easing functions.
- Enforcing keyframes animation if target is array.
- Orchestration props in
transition
prop weren't being respected by variants with notransition
of their own.
- Animation targets can be set as
keyframes
.
- Updating
dragConstraints
when they change.
- Removing GPU-acceleration for
static
components. - Adding
customStyles
plugin.
stylefire@2.4.3
- Exporting
MotionContext
.
- Updated
popmotion@8.6.3
to improve synchronisation across tweens when yoyoing.
- If
transformPagePoint
is present, transforming initial point.
- Recognising
press
when it's the lone gesture.
- Fixed an issue where values set to
style
would overwriteanimate
values even if they hadn't changed.
static
prop. Setstatic
on a motion component to prevent animation and interaction.
render
- Animating unit-converting values on mount.
- Exporting
MotionComponents
,CustomMotionComponent
,HTMLMotionComponents
andSVGMotionComponents
types. - Exporting
safeWindow
.
onDrag
event listener- Exporting
MotionStyles
type.
tap
->press
- Fixing
originX
andoriginY
SSR. - Updating
style
props to overwrite CSSrotate
,scale
andperspective
.
- Rendering
initial
properties via Stylefire when component mounts to ensure its in-sync with all transform values set ininitial
that might not later be rendered. - Exporting
htmlElements
,svgElements
andcreateMotionComponent
as their exclusion was causing errors with the output declaration file.
- Exporting
useExternalRef
.
- Simplifying inline tsdocs.
- Standardizing
(event, pointInfo)
as signature for gesture callbacks.
- Gesture priority bugs
- Added TSDocs for
useCycle
duration
anddelay
are now defined as seconds.tapActive
->tap
hoverActive
->hover
drag
->dragEnabled