"ALWAYS use when writing code importing \"motion-v\". Consult for debugging, best practices, or modifying motion-v, motion v, motion-vue, motion vue."
Resources
1Install
npx skillscat add harlan-zw/vue-ecosystem-skills/motion-v-skilld Install via the SkillsCat registry.
motiondivision/motion-vue motion-v
Version: 2.0.0-beta.4 (Feb 2026)
Deps: framer-motion@^12.29.2, hey-listen@^1.0.8, motion-dom@^12.29.2, motion-utils@^12.29.2
Tags: latest: 2.0.0-beta.4 (Feb 2026)
References: Docs — API reference, guides • GitHub Issues — bugs, workarounds, edge cases • GitHub Discussions — Q&A, patterns, recipes • Releases — changelog, breaking changes, new APIs
API Changes
This section documents version-specific API changes — prioritize recent major/minor releases.
BREAKING:
focus,hover,press,inViewshorthand props — removed in v2.0.0-beta.1. UsewhileFocus,whileHover,whilePress, andwhileInViewfor animations, and full event handlers (e.g.@hoverStart,@pressStart) for logic sourceNEW:
v-motiondirective — new in v2.0.0-beta.1, enables declarative animations on any element without requiring a<motion>component wrapper sourceBREAKING: ESM-only — v2.0.0-beta.1 dropped CommonJS support. The package now only ships ESM (
.mjs) exports sourceNEW:
MotionPlugin— new in v2.0.0-beta.1, a Vue plugin for globalv-motionand custom preset directive registrationNEW:
createPresetDirective()— new in v2.0.0-beta.1, allows creating reusable animation directives with baked-in motion optionsBREAKING:
AnimatePresencelazy discovery — v2.0.0-beta.1 refactored to usedata-apattribute for lazy discovery instead of eager registration sourceDEPRECATED:
staggerChildrenandstaggerDirection— deprecated in v1.4.0 in favor of using thestagger()utility within thetransitionprop sourceNEW:
stagger()utility — correctly handles staggering for newly-entering siblings alongside existing ones since v1.7.0 sourceNEW:
useTransformoutput maps — supports providing multiple output value maps for complex coordinate transformations since v1.9.0 sourceNEW:
Reorderauto-scrolling — supports automatic parent container scrolling when aReorder.Itemis dragged to the edges since v1.8.0 sourceNEW:
useScrollVueInstance support —containerandtargetoptions now acceptVueInstance(ref to component) since v1.6.0 sourceNEW:
useInViewrootoption — now acceptsMaybeReffor dynamic root element assignment since v1.6.0 sourceNEW:
AnimatePresencedirect children — supports multiple directmotioncomponents as children since v1.10.0 sourceNEW:
delayInMs— exported as a standalone utility function for time-based animation delays since v1.6.0 source
Also changed: useTransform reactive update fix (v1.2.1) · sequence at relative start (v1.3.0) · AnimatePresence custom prop fix (v1.3.0) · motionGlobalConfig exported (v2.0.0-beta.1) · FeatureBundle tree-shaking architecture (v2.0.0-beta.1)
Best Practices
- Create motion-supercharged components using
motion.create()outside of the template to avoid re-creating the component on every render, which would break animations source
// Preferred
const MotionComponent = motion.create(Component)
// Avoid - re-created every render
<component :is="motion.create(Component)" />- Use
MotionValues in thestyleprop to animate values outside of the Vue render cycle, significantly improving performance by avoiding frequent re-renders source
<script setup>
const x = useMotionValue(0)
</script>
<template>
<motion.div :style="{ x }" />
</template>- Reduce initial bundle size from ~34kb to ~6kb by using the
mcomponent paired withLazyMotionto load features synchronously or asynchronously only when needed source
<template>
<LazyMotion :features="domAnimation">
<m.div :animate="{ opacity: 1 }" />
</LazyMotion>
</template>Enable the
strictprop onLazyMotionduring development to catch accidental usage of the fullmotioncomponent, which would negate the bundle size benefits of lazy loading sourceCentralize animation settings like global transitions and site-wide
reducedMotionpolicies usingMotionConfigto ensure consistent behavior across all child components source(experimental) Apply declarative animations directly to any standard HTML/SVG element using the
v-motiondirective in v2.0.0-beta.1+ without needing to wrap elements in a<motion>component sourceEnsure
AnimatePresencechildren have unique, stablekeyprops and are direct children of the component to correctly track their removal for exit animations sourceSynchronize layout animations across unrelated components (those that don't share a parent-child relationship but affect each other's layout) by wrapping them in a
LayoutGroupsourcePrevent visual distortion of child elements during parent layout animations by applying the
layoutprop to the immediate children as well, enabling scale correction sourceMark scrollable ancestors with
layoutScrolland fixed-position ancestors withlayoutRootto ensure Motion correctly accounts for scroll offsets during layout measurements source