Vue 3 animation composable with plugin-based architecture
npm install @njdamstra/v-animateVue 3 animation composable with plugin-based architecture.
``bash`
npm install @njdamstra/v-animateor
pnpm add @njdamstra/v-animate
`typescript
import { useAnimation } from '@njdamstra/v-animate'
const { play, pause, stop, isPlaying } = useAnimation(elementRef, {
animation: {
preset: 'fadeIn',
duration: 300
},
autoplay: { trigger: 'visible' }
})
`
- 11 animation plugins (8 core, 3 lazy-loaded)
- 16 built-in presets
- Environment-aware (respects prefers-reduced-motion)
- SSR-safe
- Full TypeScript support
- Tree-shakeable
`typescript
import { animationPresets } from '@njdamstra/v-animate'
// Available presets:
// fadeIn, fadeOut, slideUp, slideDown, slideLeft, slideRight,
// scaleUp, scaleDown, popIn, popOut, bounceIn, shake,
// pulse, spin, flip, swing
``
MIT