About motion
A skill for React teams using Motion that guides animation design and implementation, from accessibility and performance choices to API-specific recipes. It targets Motion 13.x and React-based frameworks.
Key features
- 01Motion API and setup guidance
- 02Product motion design principles
- 03Reduced-motion and accessibility checks
- 04Performance and bundle-size guidance
- 05Implementation and QA recipes
Use cases
- 01Planning interface transitions
- 02Implementing gestures or scroll-linked motion
- 03Reviewing animation accessibility and performance
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ dobroslavradosavljevic/ skills --skill motionAfter installing, type/motionin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
agents/openai.yamlreferences/accessibility.mdcomponent-recipes.mddeliverables-qa.mdfoundations.mdpackages-react.mdperformance.mdproduction-a11y.mdsetup-react-core.mdsource-map.mdvalues-scroll-layout.mdview-animations.mdweb-implementation.mdDetails
From the project READMEMotion
Use this skill for Motion for React (motion / formerly Framer Motion) and for product motion design (purpose, tokens, a11y, performance). Prefer current motion.dev React docs over memory — pin narrative to [email protected] (latest 13.5.0).
Scope: React and React-based frameworks only (Next.js, Vite+React, Remix, etc.). Do not implement Motion for Vue, vanilla-only pages, or React Native.
Motion is not required for every hover. Keep general design gates; implement with Motion when the project already uses it or needs enter/exit, layout, gestures, or scroll-linked motion beyond CSS.
Core Rule (always)
Before proposing or coding animation, answer:
- What changed in the interface?
- Why did it change?
- Where did the changed thing come from, and where is it going?
- What should the user notice next?
- Can the user keep working without waiting for decoration?
- What is the reduced-motion equivalent?
- Will this animate on the compositor, or does it trigger layout or paint?
If it fails, remove it or simplify. Then choose the smallest tool: CSS → motion/react-mini / LazyMotion → full motion/react → AnimateView / animateView (View Transitions) only when a screenshot-style morph fits.
Workflow
- Confirm React surface:
motion/reactormotion/react-client(Next App Router). Preferbun add motion. Do not generateframer-motion,motion-v, or vanilla CDN Motion for new React UI. - Refresh versions, entry points, and doc URLs from source-map.md. Target 13.x. On 13.0+, Emotion/Styled Components need explicit
isValidPropor reversed composition — packages-react.md. - Apply product motion judgment from foundations.md (purpose, tokens, duration/easing).
- For declarative APIs (
motion.*, variants, transitions,arc(), gestures,AnimatePresence, SVG), use setup-react-core.md. - For MotionValues,
useAnimate, scroll, layout/layoutId, Reorder, and related hooks, use values-scroll-layout.md. - For View Transitions via
animateView(from"motion") or the ReactAnimateViewcomponent (motion/react-animate-view, React 19.3+), use view-animations.md. - For Next/RSC, Mini, LazyMotion sizing, migration, and Motion+, use packages-react.md.
- For LazyMotion recipes,
MotionConfig, reduced motion, performance, testing, and AI traps, use production-a11y.md. - For CSS / WAAPI / FLIP / View Transitions / scroll-driven CSS (when not using Motion), use web-implementation.md.
- For UI pattern recipes, use component-recipes.md.
- For audits, handoff, and QA, use deliverables-qa.md. Also load accessibility.md and performance.md when those are the focus.
Implementation Judgment
- Canonical import:
import { motion, AnimatePresence } from "motion/react". Next App Router:import * as motion from "motion/react-client"or"use client". - Root
<MotionConfig reducedMotion="user">— library default is"never"(OS preference ignored until you opt in). - Prefer transform / opacity; use
layout/layoutIdfor size/position morphs (notanimatewidth/height). Axis-lock withlayout="x"/layout="y"/layout="position"when needed. AnimatePresenceoutside the conditional; stablekeys;mode="wait"is single-child only.- Prefer
delayChildren: stagger(...)over legacystaggerChildrenfor new code. - Curved travel:
transition={{ path: arc() }}ortransition.layout.path— not minianimate(). - Custom components:
motion.create(Component)once (never inside render); forward refs. Motion 13: do not assume Emotion prop filtering unlessMotionConfig isValidProp={isPropValid}. - High-frequency scroll/drag: MotionValues +
style, notuseStateevery frame. - Bundle:
LazyMotion+mfrommotion/react-m;domAnimationvsdomMax(layout/drag). - Mini (
motion/react-mini) cannot use independent transforms likex/y— use fulluseAnimateor CSStransform. - View Transitions:
AnimateViewfrommotion/react-animate-view(free since 13.4; needs React/React DOM 19.3+, state changes instartTransition) or imperativeanimateViewfrom"motion"on older React. Do not assume Motion+ /motion-plusin OSS. - Reorder: omit
axisunless overriding;"xy"for grids; RTL is supported.
Verification
- Imports from
motion/react(ormotion/react-client/react-m/react-mini/react-animate-view), notframer-motion/motion-v. - Reduced-motion path exercised (
MotionConfigand/oruseReducedMotion). - Exit animations: presence wrapping + keys; interrupt/
transitionsensible for task speed. - Layout: non-static parent for
popLayout;layoutScroll/layoutRootwhen needed. - Tests:
transition={{ duration: 0 }}orfalse; awaitframe.postRenderbefore style asserts when needed. - Bundle check if adding full
motionvs LazyMotion/mini. - CSS-in-JS after 13.0: no leaked style props on the DOM (or
isValidProp/ reverse composition).