Skip to main content
skill CX Codex

framer-motion · dylantarre — Claude Code skill: what it does, how to install

This skill guides the agent in implementing Disney's 12 animation principles with Framer Motion in React. Useful for building UI transitions and gesture animations.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dylantarre/animation-principles --skill framer-motion -a claude-code
Open on GitHub

What framer-motion does

The skill provides reference patterns for applying Disney's 12 animation principles using Framer Motion's declarative React API. It covers squash and stretch via scaleX and scaleY, plus anticipation jumps using variants. The reference also details easing curves and child staggering through staggerChildren.

It targets React components directly. The snippets configure <motion.div> and <motion.button> elements with gesture handlers like whileHover and whileTap, alongside multi-step keyframe arrays.

The examples require Framer Motion in your project dependencies.

What it helps with

  • configure squash and stretch effects using scaleX and scaleY
  • implement anticipation jump sequences with variants
  • add secondary micro-interactions using whileHover and whileTap
  • stagger child list animations with staggerChildren
  • render 3D tilt effects using perspective and rotation

Example prompts for the agent

  • Add a squash and stretch click effect to this button using Framer Motion
  • Animate this card list entrance with staggerChildren
  • Implement an anticipation jump sequence for the modal using Framer Motion variants

How to install framer-motion

1Skills CLI (Vercel)

npx skills add dylantarre/animation-principles --skill framer-motion -a claude-code

2Manually: put the files in place

~/.claude/skills/framer-motion/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/framer-motion/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about framer-motion

How do I install framer-motion in Claude Code?

Run npx skills add dylantarre/animation-principles --skill framer-motion -a claude-code in your terminal.

What does the framer-motion skill do?

It provides patterns and code snippets for applying Disney's 12 animation principles using Framer Motion in React applications.

Which Framer Motion features are covered in the skill?

The skill covers animate, variants, whileHover and whileTap gesture props, transition, AnimatePresence, useAnimation, and the layout prop.

Source text

SKILL.md · MIT
---
name: framer-motion
description: Use when implementing Disney's 12 animation principles with Framer Motion in React applications
---

# Framer Motion Animation Principles

Implement all 12 Disney animation principles using Framer Motion's declarative React API.

## 1. Squash and Stretch

```jsx
<motion.div
  animate={{ scaleX: [1, 1.2, 1], scaleY: [1, 0.8, 1] }}
  transition={{ duration: 0.3, times: [0, 0.5, 1] }}
/>
```

## 2. Anticipation

```jsx
<motion.div
  variants={{
    idle: { y: 0, scaleY: 1 },
    anticipate: { y: 10, scaleY: 0.9 },
    jump: { y: -200 }
  }}
  initial="idle"
  animate={["anticipate", "jump"]}
  transition={{ duration: 0.5, times: [0, 0.2, 1] }}
/>
```

## 3. Staging

```jsx
<motion.div animate={{ filter: "blur(3px)", opacity: 0.6 }} /> {/* bg */}
<motion.div animate={{ scale: 1.1, zIndex: 10 }} /> {/* hero */}
```

## 4. Straight Ahead / Pose to Pose

```jsx
<motion.div
  animate={{
    x: [0, 100, 200, 300],
    y: [0, -50, 0, -30]
  }}
  transition={{ duration: 1, ease: "easeInOut" }}
/>
```

## 5. Follow Through and Overlapping Action

```jsx
<motion.div animate={{ x: 200 }} transition={{ duration: 0.5 }}>
  <motion.span
    animate={{ x: 200 }}
    transition={{ duration: 0.5, delay: 0.05 }} // hair
  />
  <motion.span
    animate={{ x: 200 }}
    transition={{ duration: 0.6, delay: 0.1 }} // cape
  />
</motion.div>
```

## 6. Slow In and Slow Out

```jsx
<motion.div
  animate={{ x: 300 }}
  transition={{
    duration: 0.6,
    ease: [0.42, 0, 0.58, 1] // easeInOut cubic-bezier
  }}
/>
// Or use: "easeIn", "easeOut", "easeInOut"
```

## 7. Arc

```jsx
<motion.div
  animate={{
    x: [0, 100, 200],
    y: [0, -100, 0]
  }}
  transition={{ duration: 1, ease: "easeInOut" }}
/>
```

## 8. Secondary Action

```jsx
<motion.button
  whileHover={{ scale: 1.05 }}
  whileTap={{ scale: 0.95 }}
>
  <motion.span
    animate={{ rotate: [0, 10, -10, 0] }}
    transition={{ duration: 0.3 }}
  >
    Icon
  </motion.span>
</motion.button>
```

## 9. Timing

```jsx
const timings = {
  fast: { duration: 0.15 },
  normal: { duration: 0.3 },
  slow: { duration: 0.6 },
  spring: { type: "spring", stiffness: 300, damping: 20 }
};
```

## 10. Exaggeration

```jsx
<motion.div
  animate={{ scale: 1.5, rotate: 720 }}
  transition={{
    type: "spring",
    stiffness: 200,
    damping: 10 // low damping = overshoot
  }}
/>
```

## 11. Solid Drawing

```jsx
<motion.div
  style={{ perspective: 1000 }}
  animate={{ rotateX: 45, rotateY: 30 }}
  transition={{ duration: 0.5 }}
/>
```

## 12. Appeal

```jsx
<motion.div
  whileHover={{
    scale: 1.02,
    boxShadow: "0 20px 40px rgba(0,0,0,0.2)"
  }}
  transition={{ duration: 0.3 }}
/>
```

## Stagger Children

```jsx
const container = {
  hidden: { opacity: 0 },
  show: {
    opacity: 1,
    transition: { staggerChildren: 0.1 }
  }
};

<motion.ul variants={container} initial="hidden" animate="show">
  {items.map(item => <motion.li variants={itemVariant} />)}
</motion.ul>
```

## Key Framer Motion Features

- `animate` - Target state
- `variants` - Named animation states
- `whileHover` / `whileTap` - Gesture animations
- `transition` - Timing and easing
- `AnimatePresence` - Exit animations
- `useAnimation` - Programmatic control
- `layout` - Auto-animate layout changes

© dylantarre · MIT · dylantarre/animation-principles

Similar skills

Everything for Frontend and UI →

framer-motion by other authors comes first.

framer-motion AThevon Guides coding agents on Framer Motion and Motion patterns in React: layout transitions, gestures, and DOM-direct motion values. CX Codex +1 990installs framer-motion Mindrally Tells your agent which properties to animate in Motion and which ones wreck layout. Useful when the project already runs React and TypeScript. CX Codex +1 3,000installs framer-motion pproenca Optimizes React animations using Framer Motion guidelines: slashes bundle size, eliminates unnecessary re-renders, and polishes gesture or scroll transitions. CX Codex +1 1,100installs frontend-design official anthropics This skill guides intentional visual design for new interfaces and redesigns. Use it when a generic generated UI is not enough. 1,025,790installs design-taste-frontend Leonxlnx This skill directs the design of public pages and work screens, then checks the result in a browser through screenshots. Use it when an interface feels generic or unfinished. CX Codex +1 678,700installs prototype Matt Pocock Creates throwaway prototypes for checking state logic or exploring UI before committing the decision to the main codebase. 986,201installs hyperframes heygen-com Instructs coding agents on creating, validating, and rendering HTML-based videos using the HyperFrames framework and CLI. CX Codex +1 1,200,000installs hyperframes-cli heygen-com Controls HyperFrames video workflows from the CLI: audits layouts and contrast, edits timeline clips, captures snapshots, and renders locally or in cloud runtimes. CX Codex +1 1,300,000installs webapp-testing official anthropics This skill tests local web apps with Playwright, helping agents debug UI behavior, capture screenshots, and inspect browser logs. 186,758installs

From the same set86

video-motion-graphics Applies Disney's 12 animation principles to After Effects and Premiere Pro workflows. Useful for refining easing, keyframe timing, and expressions in motion graphics projects. CX Codex +1 2,400installs mobile-touch A skill that steers your coding agent through gesture, haptic and animation work on iOS and Android. Useful when you need motion that feels native instead of guessed. CX Codex +1 2,400installs motion-designer A skill that turns your coding agent into a motion designer: timing specs, easing curves and handoff notes for UI animation. CX Codex +1 1,600installs micro-interactions A skill that tells your coding agent how to animate buttons, toggles, checkboxes, loading indicators and notification badges. CX Codex +1 1,400installs web-motion-design A skill that tells your agent how to build CSS animations, JS transitions and React or Vue motion using Disney's 12 animation principles. CX Codex +1 1,300installs scroll-animations A skill for animations tied to scrolling: reveal effects, parallax, sticky headers, progress bars. Useful when the page should react to scroll instead of just moving. CX Codex +1 1,100installs game-designer A skill for game animation work: it maps Disney's 12 principles onto responsive controls and satisfying impact feedback. CX Codex +1 1,000installs after-effects Walks your agent through Disney's 12 animation principles inside Adobe After Effects, from squash and stretch to appeal. Useful when a character or UI needs to move right. CX Codex +1 887installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor