Skip to content

framer-motion

Use when working with Framer Motion for React animations, layout transitions, gestures, scroll-driven animations, or mount/unmount transitions with AnimatePresence. Also use when debugging spring physics, animation performance, or layout animation issues.

ModelSource
sonnetpack: frontend
Full Reference

┏━ πŸ”§ framer-motion ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Use when working with Framer Motion for React … ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Motion for React (formerly Framer Motion) v12.x β€” production animation library for React. Latest stable: 12.34.x (February 2026). Package rebranded from framer-motion to motion in November 2024.

ItemValue
Packagemotion (new) or framer-motion (legacy, still works)
Current version12.34.x
React importimport { motion } from "motion/react"
RSC importimport * as motion from "motion/react-client"
Legacy importimport { motion } from "framer-motion" (still supported)
Docshttps://motion.dev/docs/react
Installnpm install motion
FileWhen to use
installation-setup.mdFirst-time setup, Next.js App Router config, MotionConfig, migration from framer-motion
animating-elements.mdmotion components, core props, animatable properties, basic patterns
transitions.mdSpring, tween, inertia configs, per-property transitions, repeat
exit-animations.mdAnimatePresence, exit prop, modes (sync/wait/popLayout), list removals, page transitions
layout-animations.mdlayout prop, layoutId shared transitions, LayoutGroup, card-to-modal, grid reflow
gestures.mdwhileHover, whileTap, whileInView, drag, dragControls, gesture callbacks
scroll.mduseScroll, useTransform, scroll-reveal patterns, useMotionValueEvent, parallax
variants.mdVariants, staggerChildren, propagation, dynamic variants, useAnimation, useAnimate
motion-values.mduseMotionValue, useSpring, useTransform, useMotionTemplate, useVelocity
performance.mdGPU-accelerated props, reducedMotion, will-change, skipAnimations, bundle size
migration-changelog.mdv10β†’v12 changes, deprecated patterns, package rename, upgrade guide

Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.