ClaudeCursorOtherIntermediateFreeEditorial

Framer Motion Skill

Teach your AI agent production-ready Framer Motion — variants, gestures, layout animations, AnimatePresence exits, and spring physics.

No reviews
F
FreshTechBro
77391

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 propsanimate, initial, exit, style, and when initial={false} is the right call.
  • Transitionstween, spring, and inertia; per-property transitions; stiffness / damping / mass; the newer visualDuration and bounce controls; and four named spring presets (gentle, wobbly, stiff, slow).
  • Variants — named animation states, propagation to children, staggerChildren, staggerDirection, and when: "beforeChildren" / "afterChildren" orchestration.
  • GestureswhileHover, whileTap, whileFocus, whileDrag, whileInView, the full event set (onHoverStart, onTap, onDragEnd, onViewportEnter), and the point / offset / velocity info objects.
  • Drag — axis locking, dragConstraints against a ref or a pixel box, dragElastic, and dragTransition bounce.
  • Exit animationsAnimatePresence, the unique-key requirement, list exits, and staggered exit sequences.
  • Layout animationslayout, layout="position", layout="size", and layoutId for shared-element transitions such as sliding tab underlines and thumbnail-to-modal expansion.
  • ScrollwhileInView with viewport={{ once, amount, margin }}, plus useInView for imperative control.
  • HooksuseAnimate with scoped selectors and stagger(), useSpring, useMotionValue, useTransform, useScroll, useReducedMotion, useAnimationControls, and usePresence.
  • Performance and accessibility — transform properties over layout properties, individual transform values, the real cost of layoutId, and honouring prefers-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:

bash
/plugin marketplace add freshtechbro/claudedesignskills
/plugin install motion-framer

Option 2 — Copy the skill folder

Use the Download button above to get just the motion-framer folder, then unzip it into your project:

bash
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.

bash
npm install framer-motion

For the newer package, use npm install motion — the skill covers both.

Try the starter

bash
cd .claude/skills/motion-framer/assets/starter_motion
npm install
npm run dev

Run the generators (optional)

Both scripts use only the Python standard library:

bash
python3 scripts/animation_generator.py --type exit --name Modal --typescript
python3 scripts/variant_builder.py --preset modal --output variants.js

Note: SKILL.md lists references/variants_patterns.md and references/gesture_guide.md under Bundled Resources, but only references/api_reference.md ships in the repo. Variant and gesture coverage is in SKILL.md and 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

v1.0.02026-08-18

Initial marketplace listing of the motion-framer skill from the Claude Design Skillstack repository.

FAQs

Reviews

Sign in to leave a rating and review.

No reviews yet. Be the first to review this skill!