Web Motion React
Motion React components and hooks: motion, AnimatePresence, layout animations, useScroll, useReducedMotion, gestures, variants, and React/Next boundaries.
Operating Contract
Use this skill as a compact router plus domain checklist. Load references only
when the current task matches their condition. Do not cite local scrape paths,
machine cache paths, or hidden source locations. Verify API details against the
target repo's installed package versions before editing.
Source Order
- Inspect the target repo's installed packages, framework/runtime versions,
local design tokens, accessibility policy, and existing motion patterns.
- Use the bundled references below for skill-specific gotchas and copied source
excerpts.
- Use official current docs/package source as API truth when local code or
bundled notes are version-sensitive.
Decision Boundaries
- Use GSAP for imperative timelines and plugin-heavy scenes.
- Use CSS for simple static transitions.
- Use WAAPI for low-level Animation object control outside React.
- For general Motion/CSS API work, native motion, or cross-stack audits,
prefer
motion, expo-motion, or design-motion-audit when installed;
otherwise proceed with the guidance here. Web R3F stays in-bundle via
web-three-r3f.
Workflow
- Confirm package import path and React/client boundary.
- Choose presence, layout, gesture, scroll, or value-based motion deliberately.
- Respect reduced motion and state ownership.
- Verify layout projection with resize, interruption, route changes, and hydration.
Gotchas
- AnimatePresence requires stable keys and actual unmounts.
- Layout animations depend on stable layout boxes and should not fight CSS transitions.
- Do not push high-frequency motion values through React state.
Bundled Resources
references/motion-react-presence-layout.md - Presence and layout workflow. Read for AnimatePresence, layout, shared layout, and exit transitions.
references/scroll-gestures-reduced-motion.md - Scroll, gesture, and reduced-motion hooks. Read for useScroll, useTransform, whileHover/tap/drag, and useReducedMotion.
references/react-ssr-client-boundaries.md - React and SSR/client boundaries. Read for Next.js, server components, hydration, and route-level validation.
references/variants-and-motion-values.md - Variants and MotionValue state ownership. Read when Motion React variants, MotionValues, transforms, gestures, or high-frequency values are involved.
references/next-router-presence-boundaries.md - Next.js and router presence boundaries. Read when AnimatePresence, route transitions, layout animations, or shared layout effects cross routing/SSR boundaries.
references/docs-motion-animate-presence.md - Copied source excerpt. Load only when exact upstream wording or API detail is needed.
references/docs-motion-layout-animations.md - Copied source excerpt. Load only when exact upstream wording or API detail is needed.
references/docs-motion-react.md - Copied source excerpt. Load only when exact upstream wording or API detail is needed.
references/docs-motion-use-reduced-motion.md - Copied source excerpt. Load only when exact upstream wording or API detail is needed.
references/docs-motion-use-scroll.md - Copied source excerpt. Load only when exact upstream wording or API detail is needed.
references/motion-react-field-guide.md - Copied source excerpt. Load only when exact upstream wording or API detail is needed.
references/index.md - Complete reference inventory and routing summary.
references/source-ledger.md - Source list, checked date, and copy policy.
references/provenance.json - Machine-readable source and local-resource metadata.
scripts/audit.mjs - Self-contained audit CLI; run doctor before scan when setup is unclear.
assets/templates/web-motion-react-audit-report.md - Audit response/report template.
assets/templates/web-motion-react-review-checklist.md - Manual review checklist.
assets/examples/web-motion-react-starter.tsx - Starter fixture/example for this skill.
evals/trigger-queries.json - Trigger/near-miss eval set for description tuning.
evals/evals.json - Task-quality evals with assertions.
Audit CLI
node scripts/audit.mjs doctor --root . --format json
node scripts/audit.mjs scan --root . --format markdown
node scripts/audit.mjs scan --root . --format json --output web-motion-react-audit.json
Treat script findings as leads. Verify every finding against current code before
changing behavior or reporting it as valid.
Closeout
Before finalizing, run the repo's focused validation command, this skill's audit
CLI when relevant, and any browser/device/manual proof required by the changed
surface. Report commands run, findings fixed, findings skipped with reasons,
and residual risk.
1---2name: web-motion-react3description: >-4 Use this skill for Motion React components and hooks: motion, AnimatePresence, layout animations, useScroll, useReducedMotion, gestures, variants, and React/Next boundaries. Trigger on Motion React, motion/react, AnimatePresence, layout animation, useScroll, useReducedMotion, variants. Do not use for near-miss tasks outside these boundaries; route to adjacent motion or platform skills when they own the implementation.5license: MIT6---78# Web Motion React910Motion React components and hooks: motion, AnimatePresence, layout animations, useScroll, useReducedMotion, gestures, variants, and React/Next boundaries.1112## Operating Contract1314Use this skill as a compact router plus domain checklist. Load references only15when the current task matches their condition. Do not cite local scrape paths,16machine cache paths, or hidden source locations. Verify API details against the17target repo's installed package versions before editing.1819## Source Order20211. Inspect the target repo's installed packages, framework/runtime versions,22 local design tokens, accessibility policy, and existing motion patterns.232. Use the bundled references below for skill-specific gotchas and copied source24 excerpts.253. Use official current docs/package source as API truth when local code or26 bundled notes are version-sensitive.2728## Decision Boundaries2930- Use GSAP for imperative timelines and plugin-heavy scenes.31- Use CSS for simple static transitions.32- Use WAAPI for low-level Animation object control outside React.33- For general Motion/CSS API work, native motion, or cross-stack audits,34 prefer `motion`, `expo-motion`, or `design-motion-audit` when installed;35 otherwise proceed with the guidance here. Web R3F stays in-bundle via36 [`web-three-r3f`](../web-three-r3f/SKILL.md).37## Workflow38391. Confirm package import path and React/client boundary.402. Choose presence, layout, gesture, scroll, or value-based motion deliberately.413. Respect reduced motion and state ownership.424. Verify layout projection with resize, interruption, route changes, and hydration.4344## Gotchas4546- AnimatePresence requires stable keys and actual unmounts.47- Layout animations depend on stable layout boxes and should not fight CSS transitions.48- Do not push high-frequency motion values through React state.4950<!-- skill-resources:start -->51## Bundled Resources5253- `references/motion-react-presence-layout.md` - Presence and layout workflow. Read for AnimatePresence, layout, shared layout, and exit transitions.54- `references/scroll-gestures-reduced-motion.md` - Scroll, gesture, and reduced-motion hooks. Read for useScroll, useTransform, whileHover/tap/drag, and useReducedMotion.55- `references/react-ssr-client-boundaries.md` - React and SSR/client boundaries. Read for Next.js, server components, hydration, and route-level validation.56- `references/variants-and-motion-values.md` - Variants and MotionValue state ownership. Read when Motion React variants, MotionValues, transforms, gestures, or high-frequency values are involved.57- `references/next-router-presence-boundaries.md` - Next.js and router presence boundaries. Read when AnimatePresence, route transitions, layout animations, or shared layout effects cross routing/SSR boundaries.58- `references/docs-motion-animate-presence.md` - Copied source excerpt. Load only when exact upstream wording or API detail is needed.59- `references/docs-motion-layout-animations.md` - Copied source excerpt. Load only when exact upstream wording or API detail is needed.60- `references/docs-motion-react.md` - Copied source excerpt. Load only when exact upstream wording or API detail is needed.61- `references/docs-motion-use-reduced-motion.md` - Copied source excerpt. Load only when exact upstream wording or API detail is needed.62- `references/docs-motion-use-scroll.md` - Copied source excerpt. Load only when exact upstream wording or API detail is needed.63- `references/motion-react-field-guide.md` - Copied source excerpt. Load only when exact upstream wording or API detail is needed.64- `references/index.md` - Complete reference inventory and routing summary.65- `references/source-ledger.md` - Source list, checked date, and copy policy.66- `references/provenance.json` - Machine-readable source and local-resource metadata.67- `scripts/audit.mjs` - Self-contained audit CLI; run `doctor` before `scan` when setup is unclear.68- `assets/templates/web-motion-react-audit-report.md` - Audit response/report template.69- `assets/templates/web-motion-react-review-checklist.md` - Manual review checklist.70- `assets/examples/web-motion-react-starter.tsx` - Starter fixture/example for this skill.71- `evals/trigger-queries.json` - Trigger/near-miss eval set for description tuning.72- `evals/evals.json` - Task-quality evals with assertions.73<!-- skill-resources:end -->7475## Audit CLI7677```bash78node scripts/audit.mjs doctor --root . --format json79node scripts/audit.mjs scan --root . --format markdown80node scripts/audit.mjs scan --root . --format json --output web-motion-react-audit.json81```8283Treat script findings as leads. Verify every finding against current code before84changing behavior or reporting it as valid.8586## Closeout8788Before finalizing, run the repo's focused validation command, this skill's audit89CLI when relevant, and any browser/device/manual proof required by the changed90surface. Report commands run, findings fixed, findings skipped with reasons,91and residual risk.