Motion

Knowledge base from the Motion (formerly Framer Motion) animation library documentation for React, Vue, and vanilla JavaScript. Use when building declarative or imperative animations, gestures (drag/hover/tap), layout animations, scroll-linked effects, or SVG/path animations, choosing between spring and tween transitions, or debugging a Motion error message.

142 capítulos

Motion

Package: motion (React, Vue, vanilla JS) | Chapters: 142 | Source pages covered: 282 | Generated: 2026-08-24

How to Use This Skill

  • Without arguments — load Core Patterns below for the composition primitives (variants, AnimatePresence, layout, motion values, gestures)
  • With a topic — ask about drag, scroll, spring, layout animation, or another indexed topic; I find and read the relevant chapter
  • With a chapter — ask for ch047; I load that specific chapter
  • With an error message — check the Troubleshooting chapter (ch132) first, it indexes Motion's official error/warning messages by symptom
  • Browse — ask "what chapters do you have?" to see the full index below

Core Patterns & Conventions

Motion's API surface is organized around a small set of composable primitives, not hundreds of independent features:

  • The motion component (<motion.div> etc.) is the entry point for declarative animation: initial/animate/exit define states, transition defines how you get there.
  • Variants name those states so parent and children can share them without repeating target values, and so AnimatePresence knows what to animate on exit.
  • Gesture props (whileHover, whileTap, whileDrag, whileFocus, whileInView) are just more named states tied to an interaction instead of to mount/unmount.
  • layout replaces manual FLIP math: give an element the layout prop (or layoutId for shared-element transitions) and Motion animates position/size changes automatically.
  • Motion values (useMotionValue, useSpring, useTransform, useScroll, useVelocity) are the escape hatch for anything that updates every frame (drag, scroll, cursor) without triggering React re-renders — bind them straight to a style prop.
  • Transitions are either spring or tween. Spring (physics-based: stiffness/damping/mass) is the default feel for anything gesture-adjacent; tween (duration + easing) is for fixed-length, predictable timing.
  • Orchestration (staggerChildren, delayChildren) lives on the parent variant's transition, not on each child.
  • Performance discipline: animate transform/opacity wherever possible; anything else risks layout/paint cost, especially in scroll- or drag-driven loops.
  • React and Vue mirror each other closely (same hook names, same prop names); vanilla JS drops the hooks and uses animate(), scroll(), and the motion-value functions directly.
  • AI Kit is a separate, smaller companion product (code generation, transition editor, code audit) layered on top of the core library, not a prerequisite for using Motion.

Chapter Index

Vanilla JS Core

#Title
ch015Custom cursor & follow-cursor animations
ch033Text animation
ch051animate()
ch052Install Motion+ for JavaScript
ch053View animations
ch054Scroll animations in JavaScript with scroll()
ch055Easing functions
ch056Layout animations
ch057Curtains
ch0583D transforms
ch061Animation performance guide
ch062arc()
ch063attrEffect
ch064CSS spring animations for React, Astro and Vue
ch065delay
ch066Frequently-asked questions about Motion
ch067frame
ch068Get started with Motion
ch070hover()
ch071Improvements to Web Animations API
ch073inView
ch074mapValue
ch076mix
ch077motionValue
ch078press()
ch079propEffect
ch080resize()
ch081scrambleText - Create scrambled text animations
ch082splitText
ch083spring
ch084springValue
ch085stagger
ch086styleEffect
ch087SVG animation: SMIL vs CSS vs JavaScript compared
ch088svgEffect
ch089transform
ch090transformValue
ch091Tween
ch092Upgrade Motion guide
ch093wrap
ch127MotionScore for Agents. AI animation performance audits for CSS & JS

React

#Title
ch001React motion component
ch002Install Motion+ for React
ch005Tailwind CSS animations
ch009Create accessible animations in React
ch010AnimateActivity - Create React exit animations
ch011Animate numbers
ch012AnimatePresence
ch013AnimateView - Animated page transitions in React
ch014React carousel component
ch016React drag animation guide
ch017React gesture animations
ch018Motion for React: Get started - React Animation Library
ch019React hover animation guide
ch020How to install Motion for React
ch021Layout Animation
ch022LayoutGroup
ch023LazyMotion
ch024Motion for React: Get started - React Animation Library
ch025Motion Values
ch026MotionConfig
ch027React Animation
ch028React scroll animation
ch029Reduce bundle size of Framer Motion
ch030Reorder
ch031ScrambleText: Scrambled text animations for React
ch032SVG Animation in React
ch034Ticker
ch035React transitions
ch036Typewriter effect & typing animations
ch037Motion & Framer Motion upgrade guide

React Hooks

#Title
ch008useCurtains - Animated page transitions in React
ch038useAnimate
ch039useAnimationFrame
ch040useDragControls
ch041useInView
ch042useMotionTemplate (React)
ch043useMotionValueEvent
ch044usePageInView
ch045useReducedMotion
ch046useScroll
ch047useSpring
ch048useTime
ch049useTransform
ch050useVelocity

Vue

#Title
ch094Vue <motion /> component
ch095AnimateNumber
ch096AnimatePresence
ch097Carousel, a performant, infinite scrolling carousel
ch098Cursor
ch099Vue gesture animations
ch100Get started with Vue animations
ch101Integration Motion for Vue with Reka
ch102Vue layout animations
ch103LayoutGroup
ch104LazyMotion
ch105v-motion Directive – Motion for Vue
ch106Motion values
ch107MotionConfig
ch108Reorder
ch109Vue scroll animation
ch110Ticker
ch111Vue transitions
ch112Vue text animations with <Typewriter>
ch125Vue animations with Motion for Vue

Vue Hooks

#Title
ch113useAnimate
ch114useAnimationFrame
ch115useDragControls
ch116useInView
ch117useMotionTemplate
ch118useMotionValueEvent
ch119useReducedMotion
ch120useScroll
ch121useSpring
ch122useTime
ch123useTransform
ch124useVelocity

AI Kit

#Title
ch126Motion AI Kit AI Context: docs and example context for your agent
ch128Generate CSS springs with your LLM
ch129Transition editor
ch130Motion AI Kit. MotionScore for Agents, current docs and CSS springs
ch131Install the Motion AI Kit

Framework & Tool Integrations

#Title
ch003Framer x Motion
ch004Figma Motion to code
ch006Animate Base UI components
ch007Radix: How to Add Animations to Radix
ch059Squarespace animation guide
ch060Wordpress animation guide
ch069GSAP vs Motion: A detailed comparison
ch072Webflow animation guide
ch075Migrate from GSAP to Motion

Troubleshooting

#Title
ch132Troubleshooting Common Errors

Examples & Recipes

#Title
ch133Loading Indicators (Recipes)
ch134Scroll-driven Effects (Recipes)
ch135Text Effects (Recipes)
ch136Cursor & Pointer Effects (Recipes)
ch137Gestures & Interaction (Recipes)
ch138Layout & Card UI Patterns (Recipes)
ch139Transitions, Keyframes & Variants (Recipes)
ch140Sliders & Carousels (Recipes)
ch141Misc & Advanced (Recipes)

Performance & Platform Notes

#Title
ch142Performance & Platform Notes

Topic Index

  • Accessibility / reduced motion → ch (see React/Vue "accessibility" and "reduced-motion" chapters), cheatsheet.md
  • AnimatePresence / exit animations → React AnimatePresence chapter, ch139 (Transitions & Variants recipes)
  • Drag gestures → React/Vue drag chapters, ch137 (Gestures recipes)
  • Errors & warnings → ch132 (Troubleshooting)
  • Layout animation → React/Vue layout-animations chapters, patterns.md
  • Motion values (useMotionValue/useTransform/useSpring/useScroll) → respective hook chapters, glossary.md
  • Performance → ch142 (Performance & Platform Notes), cheatsheet.md
  • Scroll-linked animation → useScroll chapters, ch134 (Scroll-driven Effects recipes)
  • SVG / path animation → svg-animation, svg-effect, path-drawing/path-morphing chapters
  • Variants & orchestration → React/Vue variants concepts, patterns.md
  • Vanilla JS (framework-free) usage → Vanilla JS Core chapter group

Supporting Files

Scope & Limits

This skill covers the official Motion documentation as fetched 2026-08-23 (282 source pages). Two curation decisions worth knowing:

  • Examples (114 source pages, often duplicated across JS/React/Vue for the same effect) were consolidated into 9 recipe chapters grouped by technique, covering all 86 distinct effects, rather than reproduced 1:1. Each entry names which frameworks have that recipe; read the framework-specific example on motion.dev for the full runnable code.
  • Magazine/blog posts (17 source pages) were reduced to a single chapter of durable technical notes (performance, browser quirks, API comparisons). Pure product announcements and interviews were excluded as non-reference content.

For hands-on implementation in a specific codebase, combine with project-specific tools.