web-animation-framer-motion
Motion Animation Patterns
Quick Guide: Use Motion for declarative React animations.
motion.*components for basic animations, variants for orchestrated sequences, AnimatePresence for exit animations,layout/layoutIdfor FLIP animations,useScroll/useInViewfor scroll-triggered effects. Always animate transform properties (x, y, scale, rotate, opacity) for GPU performance. Always respect reduced motion viaMotionConfig reducedMotion="user".
Import:
import { motion } from "motion/react"(v11+ package rename fromframer-motion)
<critical_requirements>
CRITICAL: Before Using This Skill
All code must follow project conventions in CLAUDE.md (kebab-case, named exports, import ordering,
import type, named constants)
(You MUST wrap exiting components in AnimatePresence for exit animations to work)
(You MUST provide unique key prop to direct children of AnimatePresence)
(You MUST animate transform properties (x, y, scale, rotate, opacity) for GPU-accelerated performance)