Motion.dev Documentation
Motion is a modern animation library for React, JavaScript, and Vue. It's the evolution of Framer Motion, offering:
- Tiny size: Just 2.3kb for the mini HTML/SVG version
- High performance: Hardware-accelerated animations
- Flexible: Animate HTML, SVG, WebGL, and JavaScript objects
- Easy to use: Intuitive API with smart defaults
- Spring physics: Natural, kinetic animations
- Scroll animations: Link values to scroll position
- Gestures: Drag, hover, tap, and more
Quick Reference
Installation
npm install motion
Basic Animation
import { animate } from "motion"
// Animate elements
animate(".box", { rotate: 360, scale: 1.2 })
// Spring animation
animate(element, { x: 100 }, { type: "spring", stiffness: 300 })
// Stagger multiple elements
animate("li", { opacity: 1 }, { delay: stagger(0.1) })
React
import { motion } from "motion/react"
<motion.div
animate={{ rotate: 360 }}
transition={{ duration: 2 }}
/>
Scroll Animations
import { scroll } from "motion"
scroll(animate(".box", { scale: [1, 2, 1] }))
Documentation Structure
quick-start.md - Installation and first animation
- More docs to be added...
When to Use This Skill
Use this skill when:
- Implementing animations in web applications
- Optimizing animation performance
- Creating scroll-based effects
- Building interactive UI with gestures
- Migrating from Framer Motion to Motion
External Resources
1---2name: motion-23version: 1.0.04description: Complete Motion.dev documentation - modern animation library for React, JavaScript, and Vue (formerly Framer Motion)5author: Leonardo Balland6tags:7 - motion8 - animation9 - react10 - javascript11 - vue12 - framer-motion13 - transitions14 - gestures15 - scroll16 - spring17 - keyframes18read_when:19 - Working with Motion animations or Framer Motion20 - Implementing animations in React, Vue, or vanilla JavaScript21 - Creating scroll-linked or scroll-triggered animations22 - Building gesture-based interactions23 - Optimizing animation performance24 - Migrating from Framer Motion to Motion25metadata:26 source: https://skillmd.com/skills/modbender/motion-227---2829# Motion.dev Documentation3031Motion is a modern animation library for React, JavaScript, and Vue. It's the evolution of Framer Motion, offering:3233- **Tiny size**: Just 2.3kb for the mini HTML/SVG version34- **High performance**: Hardware-accelerated animations35- **Flexible**: Animate HTML, SVG, WebGL, and JavaScript objects36- **Easy to use**: Intuitive API with smart defaults37- **Spring physics**: Natural, kinetic animations38- **Scroll animations**: Link values to scroll position39- **Gestures**: Drag, hover, tap, and more4041## Quick Reference4243### Installation4445```bash46npm install motion47```4849### Basic Animation5051```javascript52import { animate } from "motion"5354// Animate elements55animate(".box", { rotate: 360, scale: 1.2 })5657// Spring animation58animate(element, { x: 100 }, { type: "spring", stiffness: 300 })5960// Stagger multiple elements61animate("li", { opacity: 1 }, { delay: stagger(0.1) })62```6364### React6566```jsx67import { motion } from "motion/react"6869<motion.div70 animate={{ rotate: 360 }}71 transition={{ duration: 2 }}72/>73```7475### Scroll Animations7677```javascript78import { scroll } from "motion"7980scroll(animate(".box", { scale: [1, 2, 1] }))81```8283## Documentation Structure8485- `quick-start.md` - Installation and first animation86- More docs to be added...8788## When to Use This Skill8990Use this skill when:91- Implementing animations in web applications92- Optimizing animation performance93- Creating scroll-based effects94- Building interactive UI with gestures95- Migrating from Framer Motion to Motion9697## External Resources9899- Official site: https://motion.dev100- GitHub: https://github.com/motiondivision/motion101- Examples: https://motion.dev/examples