react-motion

Installation
SKILL.md

React Motion (Motion for React)

1. Setup

  • New code: npm i motion and import { motion, AnimatePresence } from "motion/react".
  • If the project already uses framer-motion, keep it consistent; to migrate, swap the package and change imports framer-motion → motion/react (API is the same).
  • Next.js App Router: components using motion.* must be client components ("use client"). For server components, use import * as motion from "motion/react-client".
  • Wrap the app once:
<MotionConfig reducedMotion="user" transition={{ duration: 0.3, ease: [0.22, 1, 0.36, 1] }}>
  • Bundle-size sensitive? Use LazyMotion + m components with domAnimation features.
Installs
1
First Seen
Today