Motion+
Motion / Changelog925 releases

Changelog

Releases across Motion, Motion+, and Motion AI Kit.

  1. Motionmajor12.0.0

    Changed

    • press, hover and inView now pass the target element as the first argument to the gesture start callback.
  2. Motionmajor11.0.0

    Changed

    • Replaced velocity-check jobs in favour of passive detection.
    • Post-commit render moved to a microtask.
  3. Motionmajor10.0.0

    Added

    • background-color animations are now hardware accelerated.

    Removed

    • Removing fallback for IntersectionObserver. Use a polyfill for support in older browsers.
    • Removed DeprecatedLayoutGroupContext.

    Changed

    • Using exitBeforeEnter with AnimatePresence now throws an error.
    • Using value.onChange will now throw a warning with instructions to change to value.on("change", callback).
    • Using AnimateSharedLayout now throws an error.

    Fixed

    • repeat: Infinity no longer de-opts from pre-generated WAAPI animations.
  4. Motionmajor9.0.0

    Added

    • Tap events are now keyboard accessible.

    Changed

    • whileFocus only triggers according to focus-visible rules.
  5. Motionmajor8.0.0

    Removed

    • Removed polyfilled support for mouse/touch events.
    • Removed drag pointerup patch for Safari over <select /> elements.

    Changed

    • DragControls.start now accepts PointerEvent only.
  6. Motionmajor7.0.0

    Updated

    • react@18
    • react-three-fiber@8

    Fixed

    • Drag to reorder items no longer jumping in React 18.
  7. Motionmajor6.0.0

    Changed

    • framer-motion/three is now framer-motion-3d.
  8. Motionmajor5.0.0

    Added

    • Reorder components to create drag-to-reorder interfaces.
    • LayoutGroup allows namespacing layoutId 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.

    Fixed

    • Various layout projection improvements.

    Changed

    • AnimateSharedLayout is deprecated.
  9. Motionmajor4.0.0

    Added

    • Added the new LazyMotion component to defer the loading of animations and gestures.

    Removed

    • The deprecated motion.custom(). Use motion() instead.
  10. Motionmajor3.0.0

    Added

    • whileDrag
    • Adding Safari-prefixed userSelect css to draggable elements.
    • whileHover, whileTap and exit all now accept variant lists.

    Changed

    • 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.

    Removed

    • The deprecated useInvertedScale hook. Use the layout prop instead.
    • The deprecated yoyo, flip and loop options. Use repeat and repeatType options instead.

    Fixed

    • Correctly applying transform on SVG elements.
    • Lazy-initialising viewport scroll, VisualElement.axisProgress, and reduced motion MotionValues, for increased startup performance.
    • Improved measurement scheduling for drag components and nested AnimateSharedLayout trees.
    • Robust calculation of treeScale.
  11. Motionmajor2.0.0

    Added

    • layout prop for automatic layout animations.
    • AnimateSharedLayout and layoutId for shared layout animations.
    • onMeasureDragConstraints prop that fires when dragConstraints are measured.
    • useIsPresent, a read-only version of usePresence.
    • Allow dragConstraints to be a ref that is smaller than the draggable element.

    Removed

    • positionTransition and layoutTransition props (use layout={true} instead).
    • Point type in favour of Point2D.
    • useAnimatedState: Moved to Framer library.
    • dragOriginX, dragOriginY props.
    • stylefire as a dependency.

    Fixed

    • Removing a MotionValue from style now correctly unsets it from the element.

    Changed

    • Using Proxy to generate motion components. This saves ~0.5kb from the bundle size and ensures compatibility with all DOM elements and Web Components.
    • x and y 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)
  12. Motionmajor1.0.0

    Added

    • Improved SVG support.