Installation
Quick Start
Import themotion component from motion-v and use it like any other Vue component:
Features
Motion for Vue includes all the core Motion features:- Declarative animations - Animate elements with simple props
- Spring physics - Natural, physics-based motion
- Gestures - Built-in drag, hover, tap, and focus interactions
- Layout animations - Automatic animations when layout changes
- Scroll animations - Link animations to scroll position
- GPU acceleration - Hardware-accelerated animations for smooth 60fps+ performance
API Compatibility
The Vue integration closely mirrors the React API, with Vue-specific conventions:- Props use Vue’s
:propsyntax for reactive bindings - Events use Vue’s
@eventsyntax - Refs work with Vue’s
ref()API
Component Types
Motion components are available for all HTML and SVG elements:Core Concepts
Animate Prop
Theanimate prop defines the target animation state:
Initial Prop
Set the initial state before animation:Transition Prop
Control animation timing and behavior:Reactive Animations
Motion automatically responds to reactive data changes:Next Steps
Getting Started
Set up your first Vue Motion project
Spring Animations
Create natural, physics-based animations
Gestures
Add drag and gesture interactions
Performance
Optimize for smooth 60fps animations