Changelog
Releases across Motion, Motion UI, Motion AI Kit, and Motion Studio.
Fixed
splitText: Fix gradient text (background-clip: text) clipping text beyond a character's bounding box.
Added
splitText: Keep inline markup (links,<em>,<br>, images).splitText:revert()puts the original nodes back.splitText: Lines are read from the unsplit layout, so they match the browser's own breaks, includingtext-wrap: balanceandpretty, mixed fonts, hyphenation and soft hyphens (with chars still split), right-to-left text and vertical writing modes.splitText: Gradient text made withbackground-clip: textstays visible and continuous when chars are animated.splitText: Optional callback,splitText(element, callback, options). Called whenever re-splitting. Automatically scoped withscopeMotion.splitText: International words correctly split withIntl.Segmenter, as these scripts have no spaces.splitText: Chars keep their kerning, including kerning between a space and the letter after it.useSplitText:useSplitText(ref, callback, options)splits the element after fonts load, shows it, splits again on resize and reverts on unmount.
Changed
splitText: Lines aredisplay: blockwithwhite-space: nowrap. Words and chars no longer setvertical-align: top.splitText: The container no longer gets anaria-label. Screen readers read each word split into chars from a visually hidden copy, drawn with CSS generated content so it isn't copied with the text or included intextContent. A small<style data-split-label>is added once per document or shadow root.splitTextandscrambleText: Split by grapheme cluster withIntl.Segmenter, so emoji sequences, flags and combining marks stay whole.
Fixed
FX: Fix elements withfxattribute ignoring ancestorstranslate,rotateorscale.splitText: Fix justified text losing its justification.splitText: Fixtext-indentindenting every word.
Added
FX: NewFXcomponent and<motion-fx>element. Draws live HTML in a WebGPU canvas with HTML-in-canvas, withmotionBlur,fogandlensBlureffects.
Changed
- Requires
motion14.14.0 or later. FXis covered by the Motion+ Licence inLICENSE-MOTION-PLUS.md. All other APIs remain MIT.Gallery:sphereturns freely in every direction, over its poles and round again, with no tilt limit.
Removed
Gallery: Removedshadersin favour ofFX.
Added
- Internal exports for use inside Motion UI.
Fixed
LazyMotion: Fix async hydration blink.
Added
layout: Animated layers now preserve spring velocity.layout:mass: "auto"setting for size-relative spring mass.
Fixed
pinch:draginitiated during snap animation no longer breaks animation.
Added
spring:visualDuration/bouncerespectsvelocity.
Changed
pinch: Snap points use velocity-based prediction to calculate rotation snap point.pinch: Configure transform origin between element-relative origin and pointer center.
Added
pinch: Multitouch pinch and rotate gestures.
Fixed
animate: Fix not recognising timeline of only nested sequences as timeline.- Various performance-related improvements.
Added
press:count,holdandrepeat, for double/triple press, long press and multipress gestures.drag: ExposegetPropson the dragConstraints function context.drag:x/yprops for headless gesture tracking.Reorder: Home and End buttons move selected item to beginning and end of list, respectively.motion: Newtapprop for configuring press gesture.
Fixed
animate: Minor fixes.
Added
- Ensure accelerated transform animations finish correctly.
AnimatePresence: Fixexitnever starting when a child mounts already exiting.AnimatePresence: Fixexitstuck after an openlayoutIdcard switches to another item.- Ensure accelerated animations are cleaned up in WebKit.
Added
PresenceContext: Added internalkeepValuesOnRemountoption for internal use.dragConstraints: Accepts function for internal use.Reorder: Keyboard accessibility now focuses just the first item, arrows move focus, arrow keys work in relation to how items are presented on-screen.
Added
AnimateSuspense: Animatefallbackout when replaced with content.
Changed
- Requires
motion14.9.0 or later.
Fixed
AnimateNumber: Fix digits disappearing when a fixed-trendroll is interrupted.Gallery: Fix velocity-driven modifiers liketilt()jolting when switchingarrange.Gallery: Fix shader detail pages flickering as they turn.
Added
transition: Addedmixeroption for passing custom mixer functions.
Fixed
- Only counts projection stats while
recordStats()is running. - Fix accelerated animations stuck at
initialafter remount. drag: 20% smaller.mcomponent: 6% smaller.- Keep timeline adjustments within timeline scope.
Reorder
Fixed
- Demote transforms to CPU when interrupted by layout animations.
Added
animate: Mutable timeline sequences.animate: Relative label offsets for timeline sequences.useScroll: ReturnsscrollXLengthandscrollYLength.Reorder: AddLazyMotion-compatible import.motion:transition.outprop for transitions when exiting a state.
Fixed
- Fix one flash when changing playback speed of accelerated independent transform.
AnimatePresence: Improved positioning of popped elements.spring: Fix overdamped springs snapping to target.drag: Ref-constraints kept up-to-date after scroll.motion: AnimatelayoutIdelements relative tolayoutRootcontainer.motion: Bundle size reductions.- Moving
background-coloranimations back to main thread for improved interpolation. drag: Fix drag inertia stopping dead after a fast flick from a standstill.layout:layoutIdelements now animate relative to their closestlayoutRootancestor, if any.layout:layoutIdmay be changed after mount.useScroll: Fix tracking in horizontal containers.useSpring: Reduced bundle size by 30%.
Added
Gallery: AddeddepthOfFieldshader.v
Fixed
Gallery: Trackpad momentum moves the gallery 1:1 instead of standing still and then jumping.
Changed
Gallery: Size animations run on transforms, and gestures repaint less.AnimateNumber: Measurements are batched with the frameloop.
Added
Reorder: Grab-and-move keyboard reordering.processFrame: Manually process the frameloop att.stepFrames: For tests, synchronously advance frameloop time byduration.
Fixed
- Improved tree-shaking.
motion: FixlayoutIdelements jumping in some situations.Reorder: Make auto-scroll speed independent of refresh rate.drag: Fix animations when disablingdragfrom withinonDrag.- Fix shared layout animations applying an element's own
scale/x/ytwice. - Fix replaying mount animation when an element takes over a
layoutId. motion: Fix updating SVG styles.useTransform: Improving value resolution.
Added
scopeMotion/useScopeMotion: Scope animations and gestures to set default transitions, specify root elements, match media, and easy cleanup.Reorder: PassmovedtoonReorderas second argument.
Fixed
drag: With direction lock, apply the move that sets the lock. Before, a fast drag released in that frame didn't move.press: Improve cleanup of keyboard accessibility events.Reorder: Stop double-countingwindowscroll during drag.motion: Ensure we animate from the latest props when parentActivityis made visible.useInView: Observerefif contents change after mount.
Added
- Reduced motion mode.
Added
drag: Drag gesture added to JavaScript API.
Fixed
AnimatePresence: FireonExitCompleteafter exiting children unmount.AnimatePresence:popLayoutchildren that don't acceptrefare now popped when root component is<motion>element.- Fix interpolation of axis
rotateandskewtransforms during shared layout animation. - Fix layout animations when
layoutis enabled after mount. - Fix
dragjumping to0after animatex/yto CSS variable. arc: Fix path animations withanimate.- Ensure shared elements are freed from memory when unmounted.
- Fix accelerated independent transform animations vanishing when they start from a float residue.
Added
typewriter: Added vanillatypewriterfunction.
Fixed
Gallery: Fix issues withsphereand touchpad wheel events.AnimateNumber: Fix accessible text (aria-labelonrole-lessspan).
Added
stagger: Newgrid,from: "edges" | "random"options.- Support for
scaleZ.
Fixed
- Fix matrix3d and other digit-named transform functions being tokenised as numbers.
useSpring: Ensure when switching targets we animate to the new target on switch.- Fix SVG MotionValue children being written as a children attribute.
Added
- Hardware accelerated independent transforms like
x,y,scaleXetc.
- Hardware accelerated independent transforms like
Fixed
- Fix velocity hand-off for hardware-accelerated springs.
cubicBezier: More accurate, 2x faster.Reorder: Fix click events on reoredered items.useTransform: Fix desync when source is set in an effect under Strict Mode.
Added
Gallery: Switching togrid, its cells fade in outward from the centre on the transition'sdelay, liketransition={{ arrange: { delay: stagger(0.05) } }}.Gallery: The detail strip's stagger takesstagger()'sfrom, sotransition={{ close: { delay: stagger(0.04, { from: "last" }) } }}closes it from the outside in.
Changed
Gallery: Opening detail fades the whole strip in as one staggered wave, both sides of the open item together.Gallery: An item that changes places without flying there moves with its neighbours as it fades.
Fixed
Gallery: Items gather behind the active one again when switching togrid.Gallery: New options of the same arrangement, like a ring'srotateX, blend its camera as one piece again.Gallery: Switching away fromgridafter paging no longer flies the previously active item off alone, or others in from where they were last drawn.Gallery: Closing detail just after a change no longer flies the previously open item out of the strip.
Fixed
Gallery: Closing detail fades the whole strip out together. Thumbnails with no place in view to return to no longer linger.Gallery: Paging on straight after switching togridno longer hides the item paged to.Gallery: Switching away fromgridno longer resizes its items to the next arrangement's item size as they fade out.
Added
Gallery:rearrangeoption andshift()preset set the state an item fades in from when it changes places without flying there.Gallery:rearrangeFromoption sets where the stagger starts as the detail strip opens or closes.Gallery:gatheroption. Items collapse behind the active one when switching togrid.
Fixed
Gallery: Items no longer fly across the view whenlooporarrangechanges. They fade out and in on the side they belong.Gallery: Opening and closing detail fades the other items between the arrangement and the strip.Gallery: The camera no longer swings between arrangements, so items entering the new one fade in where they belong.
Added
animateLayout: Layout animations for vanilla JS.
Fixed
- Delay animation start when main thread held to prevent visual jumps.
- Fix
whileHover/whileTapgetting stuck after Fast Refresh reorders siblings. scroll/useScroll: Fix reporting of elastic overscroll.AnimatePresence: FixpopLayoutwhen rendering into another window or iframe.animate: Fix JS animations jumping ahead when played after a pause at non-1speed.- Allow layout animations inside dragged elements.