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)
More from agents-inc/skills
web-animation-css-animations
CSS Animation patterns - transitions, keyframes, scroll-driven animations, @property, GPU-accelerated properties, accessibility with prefers-reduced-motion
24web-testing-playwright-e2e
Playwright E2E testing patterns - test structure, Page Object Model, locator strategies, assertions, network mocking, visual regression, parallel execution, fixtures, and configuration
22web-animation-view-transitions
View Transitions API patterns - same-document transitions, cross-document MPA transitions, shared element animations, pseudo-element styling, accessibility
21web-styling-cva
Class Variance Authority - type-safe component variant styling with cva(), compound variants, and VariantProps
20api-performance-api-performance
Query optimization, caching, indexing, connection pooling, async patterns
20web-i18n-next-intl
Type-safe i18n for Next.js App Router
19