Motion Plus Vue (current stable version 1.8.1) is a Vue 3 component library that extends the capabilities of the core `motion-v` animation engine. It primarily focuses on providing specialized, high-performance animation components, such as `AnimateNumber`, for modern Vue applications. While `motion-v` (version 2.x, the official 'Motion for Vue' library) offers general-purpose animation primitives like the `<motion>` component and `v-motion` directive, `motion-plus-vue` provides ready-to-use, often complex, UI animation patterns building upon `motion-v`. Its release cadence is not explicitly stated, but the version number indicates active maintenance. A key differentiator is its focus on specific, advanced animation components that are part of the broader 'Motion Plus' ecosystem, leveraging the underlying `motion-v` for hardware-accelerated and smooth user interfaces.
npm install motion-plus-vueVerified import paths — ran on the pinned version, not inferred.
Shows a basic usage of the `<AnimateNumber>` component to display and animate a changing numeric value within a Vue 3 application.
Ensure your project uses Vue 3 (>=3.0.0). Upgrade your Vue project or find an alternative library compatible with Vue 2.
Install or upgrade 'motion-v' to a compatible version: `npm install motion-v@^2.0.0` or `yarn add motion-v@^2.0.0`.
Verify licensing requirements for `AnimateNumber` and any other 'Motion Plus' features you intend to use. You might need to purchase a Motion+ membership and install `motion-plus` with a private token.
Implement SSR-safe practices. For Nuxt, wrap components in `<client-only>`. For other SSR frameworks, use dynamic imports (`import('...')`) to load animation components only on the client.Utilize performance optimization techniques: use CSS transforms where possible, debounce/throttle updates, and leverage Motion's performance features like 'willChange' properties.
Ensure you have `import { AnimateNumber } from 'motion-plus-vue'` in your script setup or component options, and that `motion-plus-vue` is correctly installed.Run `npm install motion-v@^2.0.0` or `yarn add motion-v@^2.0.0` to install the correct peer dependency.
Ensure you are importing and using `MotionPlugin` correctly from `motion-v` if you intend to register global directives. Components from `motion-plus-vue` are typically imported and used directly in templates.
Ensure 'motion-plus-vue' is installed (`npm install motion-plus-vue`) and your `tsconfig.json` correctly includes `"allowSyntheticDefaultImports": true` and `"esModuleInterop": true` if you are using default imports, though named imports are preferred for this library.