Skip to main content
skill CX Codex

web-motion-design — Claude Code skill: animation principles

A skill that tells your agent how to build CSS animations, JS transitions and React or Vue motion using Disney's 12 animation principles.

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

What web-motion-design does

The skill maps the 12 classic animation principles onto browser work: squash & stretch, anticipation, staging, follow through, slow in/slow out, arc, exaggeration and the rest. Each one gets a web implementation in a reference table, from transform: scale() on interaction states to offset-path for arced movement.

Numbers are included. Micro-interactions run 100-200ms, standard transitions 200-400ms, complex sequences 400-700ms, page transitions 300-500ms. On easing, the skill says never use linear for UI motion and hands you curves: standard cubic-bezier(0.4, 0, 0.2, 1), enter cubic-bezier(0, 0, 0.2, 1), exit cubic-bezier(0.4, 0, 1, 1). Two code patterns ship with it — a button with squash/stretch and a dropdown with anticipation.

A performance section covers the usual ground: animate only transform and opacity, use will-change sparingly and remove it after the animation, prefer CSS over JavaScript when the motion is predictable. The solid drawing principle is the one to check if you already have conflicting transforms on a single element — inconsistent transform-origin and missing perspective are where the visual glitches come from.

What it helps with

  • pick a duration and easing curve for a micro-interaction
  • make a button press feel like it has weight
  • stagger child elements in a list animation
  • stop animation jank on low-powered devices
  • add anticipation before a dropdown expands

Example prompts for the agent

  • Animate the dropdown opening using the web-motion-design skill
  • Pick easing and duration for the button hover state
  • Review my CSS transitions against the animation principles

How to install web-motion-design

1Skills CLI (Vercel)

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

2Manually: put the files in place

~/.claude/skills/web-motion-design/SKILL.md

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

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

Questions about web-motion-design

How do I install web-motion-design in Claude?

Run npx skills add dylantarre/animation-principles --skill web-motion-design -a claude-code. The skill file lands at ~/.claude/skills/web-motion-design/SKILL.md.

What does web-motion-design do?

It gives the agent a reference for the 12 animation principles with their web implementations: duration values, easing curves, CSS examples and performance rules.

Which platforms can use this skill?

Install steps are listed for Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. GitHub Copilot uses a different command: gh skill install dylantarre/animation-principles web-motion-design.

Source text

SKILL.md · MIT
---
name: web-motion-design
description: Use when building CSS animations, JavaScript transitions, React/Vue motion, or any browser-based animation work.
---

# Web Motion Design

Apply Disney's 12 animation principles to CSS, JavaScript, and frontend frameworks.

## Quick Reference

| Principle | Web Implementation |
|-----------|-------------------|
| Squash & Stretch | `transform: scale()` on interaction states |
| Anticipation | Slight reverse movement before action |
| Staging | Focus user attention with motion hierarchy |
| Straight Ahead / Pose to Pose | JS frame-by-frame vs CSS keyframes |
| Follow Through / Overlapping | Staggered child animations, elastic easing |
| Slow In / Slow Out | `ease-in-out`, cubic-bezier curves |
| Arc | `motion-path` or bezier translate transforms |
| Secondary Action | Shadows, glows responding to primary motion |
| Timing | Duration: micro 100-200ms, standard 200-400ms |
| Exaggeration | Scale beyond 1.0, overshoot animations |
| Solid Drawing | Consistent transform-origin, 3D perspective |
| Appeal | Smooth 60fps, purposeful motion design |

## Principle Applications

**Squash & Stretch**: Apply `scaleY` compression on button press, `scaleX` stretch on hover. Keep volume constant—if you compress Y, expand X slightly.

**Anticipation**: Before expanding a dropdown, shrink it 2-3% first. Before sliding content left, move it 5px right.

**Staging**: Dim background elements during modal focus. Use motion to direct eye flow—animate important elements first.

**Straight Ahead vs Pose to Pose**: Use CSS `@keyframes` for predictable, repeatable animations (pose to pose). Use JavaScript/GSAP for dynamic, physics-based motion (straight ahead).

**Follow Through & Overlapping**: Child elements should complete movement after parent stops. Use `animation-delay` with decreasing values for natural stagger.

**Slow In / Slow Out**: Never use `linear` for UI motion. Standard easing: `cubic-bezier(0.4, 0, 0.2, 1)`. Enter: `cubic-bezier(0, 0, 0.2, 1)`. Exit: `cubic-bezier(0.4, 0, 1, 1)`.

**Arc**: Elements in nature move in arcs, not straight lines. Use `offset-path` or combine X/Y transforms with different easings.

**Secondary Action**: Button shadow grows/blurs on hover. Icon inside button rotates while button scales. Background particles respond to primary element.

**Timing**: Micro-interactions: 100-200ms. Standard transitions: 200-400ms. Complex sequences: 400-700ms. Page transitions: 300-500ms.

**Exaggeration**: Hover states scale to 1.05-1.1, not 1.01. Error shakes move 10-20px, not 2px. Make motion noticeable but not jarring.

**Solid Drawing**: Maintain consistent `transform-origin`. Use `perspective` for 3D depth. Avoid conflicting transforms that create visual glitches.

**Appeal**: Target 60fps—use `transform` and `opacity` only when possible. Add subtle personality through custom easing curves. Motion should feel intentional.

## Code Patterns

```css
/* Elastic button with squash/stretch */
.button:active {
  transform: scale(0.95, 1.05);
  transition: transform 100ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Anticipation before expansion */
.dropdown-enter {
  animation: dropdown-open 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dropdown-open {
  0% { transform: scaleY(0.98); opacity: 0; }
  100% { transform: scaleY(1); opacity: 1; }
}
```

## Performance Rules

1. Animate only `transform` and `opacity` for GPU acceleration
2. Use `will-change` sparingly and remove after animation
3. Prefer CSS over JavaScript when animation is predictable
4. Test on low-powered devices

© dylantarre · MIT · dylantarre/animation-principles

Similar skills

Everything for Frontend and UI →

From the same set86

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 framer-motion 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. CX Codex +1 1,700installs 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 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 css-native This skill gets your agent writing motion with plain CSS: @keyframes, transition, transform. Useful when interface animation should not pull in a JS library. CX Codex +1 714installs

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