Vue-pose is a declarative animation library specifically designed for Vue 2 applications, built upon the Popmotion animation engine. It offers a component-based approach to UI animation, allowing developers to define sophisticated motion sequences and state transitions directly within their Vue templates using components like `<Pose>` and `<PoseGroup>`. The library's current stable version, 0.5.1, was released over five years ago, indicating that it is no longer actively maintained or supported. Consequently, `vue-pose` is incompatible with Vue 3 and modern development practices, effectively rendering it an abandoned project within the contemporary Vue ecosystem. Its primary appeal was its ability to bring a powerful, state-driven animation paradigm to Vue 2, simplifying complex animation orchestrations compared to more imperative alternatives. Developers should exercise caution and consider modern, actively maintained libraries for new projects.
npm install vue-poseVerified import paths — ran on the pinned version, not inferred.
Demonstrates a basic Vue component using `<Pose>` to animate a box between 'hidden' and 'visible' states based on a button click, defining poses and transitions directly on the component.
`vue-pose` cannot be made compatible with Vue 3. For Vue 3 projects, consider modern animation libraries like Framer Motion (with a Vue wrapper), VueUse/motion, or GSAP.
Migrate to actively maintained Vue 2 animation solutions (if still on Vue 2) or, preferably, upgrade to Vue 3 and use a modern, Vue 3-compatible animation library.
For animating items entering or leaving the DOM, it's recommended to use `<PoseGroup>` which is designed to manage children's mounted/unmounted state to allow exit animations. Alternatively, use `v-show` and manually control the 'exit' state via props before setting `v-show` to false.
Manually apply `will-change` CSS properties to the animated elements to hint browsers about upcoming transformations. For example, `will-change: opacity, transform;` to optimize rendering.
Ensure `vue-pose` is installed (`npm install vue-pose`) and the `Pose` component is imported and registered in your Vue component's `components` option: `import { Pose } from 'vue-pose'; export default { components: { Pose } };``vue-pose` is not compatible with Vue 3. There is no fix to make `vue-pose` work directly with Vue 3. Consider migrating to modern Vue 3-compatible animation libraries like Framer Motion, VueUse/motion, or GSAP.
Ensure that the string value passed to the `:pose` prop (e.g., `'active'`) exactly matches one of the keys defined in the `:poses` object prop of your `<Pose>` component, for example: `:poses="{ active: { opacity: 1 }, inactive: { opacity: 0 } }"`.