Framer Motion Skill
Teach your AI agent production-ready Framer Motion — variants, gestures, layout animations, AnimatePresence exits, and spring physics.
Overview
Framer Motion Skill is an Agent Skill that gives AI coding agents production-ready knowledge of Motion (formerly Framer Motion) — the declarative React animation library — covering motion components, variants, gestures, layout animations, AnimatePresence, spring physics, and scroll-triggered effects, with a runnable Vite starter and two boilerplate generators.
What is Framer Motion?
Framer Motion is the most widely used animation library for React. It turns any element into an animatable one via motion.div, motion.button, or motion.svg, and drives everything from declarative props — initial, animate, exit, transition, whileHover, whileTap, drag, layout. Motion (v11+) is the smaller, framework-agnostic successor from the same authors, published at motion.dev. The API is largely shared, and this skill covers both.
What the skill teaches your agent
- Motion components and props —
animate,initial,exit,style, and wheninitial={false}is the right call. - Transitions —
tween,spring, andinertia; per-property transitions;stiffness/damping/mass; the newervisualDurationandbouncecontrols; and four named spring presets (gentle, wobbly, stiff, slow). - Variants — named animation states, propagation to children,
staggerChildren,staggerDirection, andwhen: "beforeChildren"/"afterChildren"orchestration. - Gestures —
whileHover,whileTap,whileFocus,whileDrag,whileInView, the full event set (onHoverStart,onTap,onDragEnd,onViewportEnter), and thepoint/offset/velocityinfo objects. - Drag — axis locking,
dragConstraintsagainst a ref or a pixel box,dragElastic, anddragTransitionbounce. - Exit animations —
AnimatePresence, the unique-keyrequirement, list exits, and staggered exit sequences. - Layout animations —
layout,layout="position",layout="size", andlayoutIdfor shared-element transitions such as sliding tab underlines and thumbnail-to-modal expansion. - Scroll —
whileInViewwithviewport={{ once, amount, margin }}, plususeInViewfor imperative control. - Hooks —
useAnimatewith scoped selectors andstagger(),useSpring,useMotionValue,useTransform,useScroll,useReducedMotion,useAnimationControls, andusePresence. - Performance and accessibility — transform properties over layout properties, individual transform values, the real cost of
layoutId, and honouringprefers-reduced-motion.
How it works
The skill is a folder, not a package. SKILL.md carries YAML frontmatter telling the agent exactly when to activate — building interactive components, micro-interactions, page transitions, or drag interfaces. Alongside it sit references/api_reference.md for deeper lookups, two Python generators, and a complete starter app. Progressive disclosure means the agent reads SKILL.md first and only opens the reference when a task needs it.
Copy the folder into .claude/skills/, or install it as a Claude Code plugin from the parent marketplace — the plugin form adds two slash commands and a Framer Motion Animation Choreographer agent.
Six pitfalls it fixes
Each is documented with the broken code and the correction: exit animations without AnimatePresence, list items missing a unique key, animating top / left / width instead of transforms, overusing layout across long lists, duplicating props instead of using variants, and placing transition where it never applies to whileHover.
Who it is for
React developers building interactive UI with Claude Code, Cursor, or claude.ai — anyone who wants micro-interactions, page transitions, and layout animations written correctly rather than approximated from training data.
What you can build
Hover and press micro-interactions, drag-and-drop cards, modals that animate out properly, staggered lists, tab indicators that slide between items, thumbnail-to-fullscreen shared element transitions, scroll-reveal sections, animated form validation, loading states, image galleries, and route transitions.
Why it matters
This library was renamed and restructured — Framer Motion became Motion, and the docs moved from framer.com/motion to motion.dev — so training data blends two naming eras and several API generations. The failures that follow are specific and repeatable: exit animations that silently do nothing because AnimatePresence is missing, a transition prop that never reaches whileHover, and animations on left and width that stutter on every frame. This skill names each one and shows the correct form.
What's Included
- SKILL.md — a ~2,700-word guide covering core concepts, common patterns, gestures, hooks, integration, performance, and pitfalls
- references/api_reference.md — a ~2,500-word API reference for props, transitions, variants, hooks, and AnimatePresence
- scripts/animation_generator.py — CLI that generates component boilerplate for 11 animation types, with a --typescript flag
- scripts/variant_builder.py — interactive variant builder with 8 presets (fade, slide, scale, rotate, stagger, modal, page, custom)
- assets/starter_motion/ — a Vite + React 18 + framer-motion v11 starter app
- Starter components: DraggableBox, HoverCard, and StaggerList
- assets/examples/README.md — a 51-section pattern catalogue covering page transitions, route animations, modals, galleries, nav menus, and loading states
- Six documented pitfalls, each with the broken code and the fix
- Four named spring presets (gentle, wobbly, stiff, slow) with stiffness and damping values
- Integration recipes for GSAP, React Three Fiber, and form validation
- As a plugin: two slash commands plus a Framer Motion Animation Choreographer agent
Installation
Option 1 — Install as a Claude Code plugin (recommended)
This skill lives in a plugin marketplace, so Claude Code can install it, its two slash commands, and its choreographer agent in one step:
/plugin marketplace add freshtechbro/claudedesignskills
/plugin install motion-framerOption 2 — Copy the skill folder
Use the Download button above to get just the motion-framer folder, then unzip it into your project:
mkdir -p .claude/skills
unzip motion-framer.zip -d .claude/skills/Your tree should end up as .claude/skills/motion-framer/SKILL.md.
Option 3 — Upload to claude.ai
Zip the motion-framer folder and upload it in claude.ai under Settings → Capabilities → Skills.
Install the library in your project
The skill documents the API; it does not bundle the library.
npm install framer-motionFor the newer package, use npm install motion — the skill covers both.
Try the starter
cd .claude/skills/motion-framer/assets/starter_motion
npm install
npm run devRun the generators (optional)
Both scripts use only the Python standard library:
python3 scripts/animation_generator.py --type exit --name Modal --typescript
python3 scripts/variant_builder.py --preset modal --output variants.jsNote:
SKILL.mdlistsreferences/variants_patterns.mdandreferences/gesture_guide.mdunder Bundled Resources, but onlyreferences/api_reference.mdships in the repo. Variant and gesture coverage is inSKILL.mdand the API reference instead.
Requirements
- An AI agent that reads the Agent Skills format (Claude Code, Cursor) or a claude.ai account with Skills enabled
- A React 18+ project
- framer-motion v11+ or the motion package installed (npm install framer-motion)
- Node.js 18 or newer to run the bundled Vite starter
- Python 3 to run the optional generator scripts (standard library only, no packages to install)
Changelog
Initial marketplace listing of the motion-framer skill from the Claude Design Skillstack repository.
FAQs
Related Skills
Frontend Design
Generate distinctive, production-grade frontend UIs — components, pages, dashboards, and landing pages — that avoid generic AI aesthetics.
Web Artifacts Builder
Build elaborate multi-component claude.ai artifacts with React, Tailwind CSS, and shadcn/ui, bundled to one HTML file.
MCP Builder
Build high-quality MCP servers in Python (FastMCP) or TypeScript (MCP SDK) with well-designed tools and evals.
Tailwind CSS v4 Docs Skill
Give your AI agent the official Tailwind CSS v4 docs on demand — synced locally, with a v4 gotchas list and an engineering playbook.
Official Skills for Next.js, React, and Vercel Deployments
Vercel's official agent skills that teach AI coding agents to build, optimize, and ship Next.js & React apps the right way
Supabase Agent Skills
Official Supabase skills that teach AI agents to build, query, and secure Supabase apps correctly.