
motion
Web animations with Motion (formerly Framer Motion) for React -- gestures, scroll effects, spring physics, layout animations, SVG, micro-interactions, loading states. Use when: drag-and-drop, scroll animations, modals, carousels, parallax, page transitions, hover effects, staggered lists, loading spinners, number counters. Troubleshoot: AnimatePresence exit, list performance, Tailwind conflicts, Next.js "use client", layout in scaled containers.
- Installs
- 145
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/oakoss/agent-skills --skill motion- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads motion automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Motion
Overview
Motion (package: motion, formerly framer-motion) is the standard React animation library. Import from motion/react. Provides declarative props for gestures, scroll-linked animations, layout transitions, SVG path drawing, and spring physics. Uses a hybrid animation engine (WAAPI for transforms/opacity, ScrollTimeline for scroll-linked effects). Bundle ranges from 2.3 KB (useAnimate mini) to 34 KB (full), optimizable to 4.6 KB with LazyMotion. Compatible with React 18.2+, React 19, Next.js App Router, and Vite.
Do NOT use Motion for simple list add/remove animations (use AutoAnimate instead at 3.28 KB). Do NOT use for 3D (use Three.js / React Three Fiber).
Quick Reference
| Pattern | API / Props |
|---|---|
| Fade in on mount | initial, animate, transition |
| Exit animations | AnimatePresence + exit prop (unique key required) |
| Staggered list | variants with staggerChildren |
| Hover / tap / focus | whileHover, whileTap, whileFocus |
| Drag | drag, dragConstraints, dragElastic |
| Scroll-triggered | whileInView, viewport={{ once: true }} |
| Scroll-linked/parallax | useScroll + useTransform |
| Progress indicator | scrollYProgress + scaleX |
| Layout animation | layout prop (FLIP technique) |
| Shared element | layoutId (same ID across views) |
| Layout group | LayoutGroup wrapping sibling lists |
| Page transition | AnimatePresence + key={pathname} |
| SVG path drawing | pathLength on motion.path |
| Animated counter | useSpring + useTransform |
| Imperative control | useAnimate hook returns [scope, animate] |
| Custom components | motion.create(Component) wraps any component |
| Bundle optimization | LazyMotion + domAnimation + m component (4.6 KB) |
| Reduced motion | MotionConfig reducedMotion="user" |
Common Mistakes
| Mistake | Correct Pattern |
|---|---|
| AnimatePresence inside a conditional | Keep AnimatePresence mounted; place conditional content inside it |
Missing unique key on AnimatePresence children | Add unique key to each direct child for exit animations |
Tailwind transition-* classes with Motion animate props | Remove Tailwind transition classes to avoid stuttering |
Importing from framer-motion | Use import { motion } from "motion/react" (renamed late 2024) |
| Animating 50+ items without virtualization | Use react-window or @tanstack/react-virtual for large lists |
| Full 34 KB bundle for simple animations | Use LazyMotion + domAnimation (4.6 KB) or useAnimate (2.3 KB) |
Missing "use client" in Next.js App Router | Add directive or use motion/react-client import |
Animating width/height directly | Use layout prop or transform: scale for GPU acceleration |
No prefers-reduced-motion handling | Wrap app in MotionConfig reducedMotion="user" |
Delegation
- Audit animation performance and bundle size: Use
Exploreagent to find heavy imports, missing LazyMotion, and reflow-triggering properties - Build complex multi-step animations: Use
Taskagent for scroll-linked parallax, shared layout transitions, and staggered sequences - Plan animation architecture for a new project: Use
Planagent to evaluate Motion vs AutoAnimate vs CSS-only based on requirements
If the
design-systemskill is available, delegate animation token definitions and motion design guidelines to it.
References
- Core Patterns -- Animation patterns: fade, exit, stagger, gestures, modal, accordion, tabs, scroll, layout, drag, SVG, loading
- Scroll Animations -- useScroll, useTransform, scroll-triggered, parallax, progress indicators, offset configuration
- Performance -- LazyMotion, useAnimate, hardware acceleration, virtualization, production checklist
- Next.js Integration -- App Router patterns, motion/react-client, Pages Router, known issues
- Accessibility & CSS -- prefers-reduced-motion, MotionConfig, useReducedMotion, CSS keyframes, Tailwind animations
- Library Selection Guide -- Motion vs AutoAnimate decision guide with feature comparison and use-case recommendations
- Troubleshooting -- AnimatePresence bugs, Tailwind conflicts, layout glitches, React 19 issues, naming migration
FAQ
What does the motion skill do?
Web animations with Motion (formerly Framer Motion) for React -- gestures, scroll effects, spring physics, layout animations, SVG, micro-interactions, loading states. Use when: drag-and-drop, scroll animations, modals, carousels, parallax, page transitions, hover effects, staggered lists, loading spinners, number counters. Troubleshoot: AnimatePresence exit, list performance, Tailwind conflicts, Next.js "use client", layout in scaled containers.
How do I install motion?
Run npx skills add https://github.com/oakoss/agent-skills --skill motion in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/motion/ (personal) or .claude/skills/motion/ (project).
Which AI agents can use motion?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is motion safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains motion?
It is published by oakoss in oakoss/agent-skills. It has 145 recorded installs.
More from oakoss/agent-skills
ui-ux-polish
oakoss/agent-skills
Iterative UI/UX polishing workflow for web applications. Use when improving visual polish, refining desktop and mobile UX separately, running iterative enhancement cycles, applying design patterns like glassmorphism or bento grids, or auditing accessibility and WCAG compliance. Use for Stripe-level visual quality, responsive optimization, and design system alignment.
playwright
oakoss/agent-skills
Open the skill to read its SKILL.md instructions.
coolify
oakoss/agent-skills
Coolify self-hosted PaaS for deploying applications, databases, and services via REST API and Git integration. Covers API authentication, deployment triggers, build packs (Nixpacks, Dockerfile, Compose), CI/CD with GitHub Actions webhooks, environment management, and Traefik proxy configuration. Use when deploying apps to Coolify, triggering deployments via API, configuring build packs, setting up GitHub Actions CI/CD pipelines, managing environment variables, or troubleshooting deployment failures.
application-security
oakoss/agent-skills
Open the skill to read its SKILL.md instructions.
find-skills
oakoss/agent-skills
Open the skill to read its SKILL.md instructions.
drizzle-orm
oakoss/agent-skills
Open the skill to read its SKILL.md instructions.
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.