SKILL

react-motion

Build UI animation in React/Next.js with Motion for React (formerly Framer Motion) — micro-interactions, enter/exit with AnimatePresence, layout and shared-element animations, gestures (hover, tap, drag), scroll-linked values, staggered lists, modals, tabs, menus, and page transitions. Use whenever the user mentions Motion, framer-motion, motion/react, AnimatePresence, layoutId, page transition in Next.js, animated modal/menu/tabs, or wants React components to feel smooth and alive.

Target: React / Next.js. Automatically collected · unverified.

Excerpt from the author’s documentation

Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.

Read the original English text

Topics in the source

  • React Motion (Motion for React)
  • 1. Setup
  • 2. Core patterns
  • 3. Page transitions in Next.js
  • 4. Rules
  • 5. Verify

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: Bundle-size sensitive? Use LazyMotion + m components with domAnimation features. Variants + stagger (lists, hero groups) Enter/exit (modals, toasts, dropdowns) — AnimatePresence must stay mounted; the child gets a stable key: Use mode="wait" when swapping one element for another (tab content, steps). Layout animation — layout prop animates size/position changes (accordion, filtering grid, reordering). Shared element: same layoutId in two places (tab underline, card → detail). Wrap related groups in . Micro-interactions Springs for physical feel (buttons, drag, toggles); tweens with ease-out for reveals. Scroll-linked For complex pinned/scrubbed storytelling, use GSAP instead (scroll-animation skill). Drag — drag="x", dragConstraints={ref}, dragElastic, onDragEnd with ve

This is an excerpt. Refer to the complete source and its current requirements.

Source repository
KILN-skills/kiln
Source file
skills/react-motion/SKILL.md
Fixed revision
555d7ea59d05910b4ef6fb39780da5f906be832b
Read the complete original documentation ↗

Requirements

  • Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.

A small first task

先阅读原作者说明,再决定是否在自己的 AI 工具中使用。

Instructions for your AI tool

Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.

Sources and evidence

This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.

Author: KILN-skills/kiln · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-10T04:00:15.433Z.

Categories are inferred from names, descriptions and paths. They do not establish compatibility.

License and attribution

MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.

Original license ↗

Synchronization, copying and user-reported success do not mark a resource as runtime-tested.

Limitations and notes

  • Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.