12-principles-of-animation
raphaelsalaja/skill
Audit animation code against Disney's 12 principles for web interfaces.
What is 12-principles-of-animation?
This skill reviews animation implementations against Disney's 12 principles adapted for web, checking timing, easing, physics, and staging. Use it when implementing animations, reviewing motion code, or ensuring animation quality meets professional standards.
- Validates user-initiated animations complete within 300ms
- Checks easing functions match animation direction (ease-out for entrance, ease-in for exit)
- Ensures interactive elements have active/pressed states with appropriate scale transforms
- Verifies staging principles like single focal points and modal background dimming
- Detects inconsistent timing across similar elements
- Reports findings in file:line format with rule IDs and severity
How to install 12-principles-of-animation
npx skills add https://github.com/raphaelsalaja/skill --skill 12-principles-of-animationHow to use 12-principles-of-animation
- 1.Specify the files or patterns to audit (CSS, TSX, or animation code)
- 2.The skill reads and analyzes the specified files against all 16 rules
- 3.Review the output findings listed in file:line format with rule IDs
- 4.Check the summary table for rule violation counts and severity levels
- 5.Address HIGH priority violations (timing, physics) before MEDIUM (easing, staging)
Use cases
- Code review of modal, button, and transition animations before merging
- Auditing existing animation codebase for consistency with design principles
- Validating spring-based animations use appropriate stiffness and damping values
- Checking that stagger delays don't exceed 50ms per item in list animations
- Ensuring context menus and overlays follow entrance/exit animation rules
- Frontend engineers implementing animations
- Design systems teams establishing animation standards
- Code reviewers checking animation quality
- Web developers working with motion libraries like Framer Motion
12-principles-of-animation FAQ
The skill audits CSS transitions, CSS animations, and JavaScript-based libraries like Framer Motion. It checks the principles regardless of implementation method.
300ms is the threshold where animations feel responsive to user input. Longer durations make interfaces feel sluggish or unresponsive.
Ease-out accelerates quickly then decelerates (good for entrances—arrives fast, settles gently). Ease-in accelerates slowly then quickly (good for exits—builds momentum before departure).
Use springs when you want overshoot-and-settle behavior (bouncy, natural feel). Use easing for predictable, controlled animations without bounce.
Keep squash/stretch effects in the 0.95–1.05 range. A scale of 0.98 on button press feels responsive; 0.8 feels exaggerated and breaks the illusion of weight.
Full instructions (SKILL.md)
Source of truth, from raphaelsalaja/skill.
name: 12-principles-of-animation description: Audit animation code against Disney's 12 principles adapted for web. Use when reviewing motion, implementing animations, or checking animation quality. Outputs file:line findings. license: MIT metadata: author: raphael-salaja version: "2.0.0" source: /content/12-principles-of-animation/index.mdx
12 Principles of Animation
Review animation code for compliance with Disney's 12 principles adapted for web interfaces.
How It Works
- Read the specified files (or prompt user for files/pattern)
- Check against all rules below
- Output findings in
file:lineformat
Rule Categories
| Priority | Category | Prefix |
|---|---|---|
| 1 | Timing | timing- |
| 2 | Easing | easing- |
| 3 | Physics | physics- |
| 4 | Staging | staging- |
Rules
Timing Rules
timing-under-300ms
User-initiated animations must complete within 300ms.
Fail:
.button { transition: transform 400ms; }
Pass:
.button { transition: transform 200ms; }
timing-consistent
Similar elements must use identical timing values.
Fail:
.button-primary { transition: 200ms; }
.button-secondary { transition: 150ms; }
Pass:
.button-primary { transition: 200ms; }
.button-secondary { transition: 200ms; }
timing-no-entrance-context-menu
Context menus should not animate on entrance (exit only).
Fail:
<motion.div initial={{ opacity: 0 }} animate={{ opacity: 1 }} />
Pass:
<motion.div exit={{ opacity: 0 }} />
Easing Rules
easing-entrance-ease-out
Entrances must use ease-out (arrive fast, settle gently).
Fail:
.modal-enter { animation-timing-function: ease-in; }
Pass:
.modal-enter { animation-timing-function: ease-out; }
easing-exit-ease-in
Exits must use ease-in (build momentum before departure).
Fail:
.modal-exit { animation-timing-function: ease-out; }
Pass:
.modal-exit { animation-timing-function: ease-in; }
easing-no-linear-motion
Linear easing should only be used for progress indicators, not motion.
Fail:
.card { transition: transform 200ms linear; }
Pass:
.progress-bar { transition: width 100ms linear; }
easing-natural-decay
Use exponential ramps, not linear, for natural decay.
Fail:
gain.gain.linearRampToValueAtTime(0, t + 0.05);
Pass:
gain.gain.exponentialRampToValueAtTime(0.001, t + 0.05);
Physics Rules
physics-active-state
Interactive elements must have active/pressed state with scale transform.
Fail:
.button:hover { background: var(--gray-3); }
/* Missing :active state */
Pass:
.button:active { transform: scale(0.98); }
physics-subtle-deformation
Squash/stretch deformation must be subtle (0.95-1.05 range).
Fail:
<motion.div whileTap={{ scale: 0.8 }} />
Pass:
<motion.div whileTap={{ scale: 0.98 }} />
physics-spring-for-overshoot
Use springs (not easing) when overshoot-and-settle is needed.
Fail:
<motion.div transition={{ duration: 0.3, ease: "easeOut" }} />
// When element should bounce/settle
Pass:
<motion.div transition={{ type: "spring", stiffness: 500, damping: 30 }} />
physics-no-excessive-stagger
Stagger delays must not exceed 50ms per item.
Fail:
transition={{ staggerChildren: 0.15 }}
Pass:
transition={{ staggerChildren: 0.03 }}
Staging Rules
staging-one-focal-point
Only one element should animate prominently at a time.
Fail:
// Multiple elements with competing entrance animations
<motion.div animate={{ scale: 1.1 }} />
<motion.div animate={{ scale: 1.1 }} />
staging-dim-background
Modal/dialog backgrounds should dim to direct focus.
Fail:
.overlay { background: transparent; }
Pass:
.overlay { background: var(--black-a6); }
staging-z-index-hierarchy
Animated elements must respect z-index layering.
Fail:
.tooltip { /* No z-index, may render behind other elements */ }
Pass:
.tooltip { z-index: 50; }
Output Format
When reviewing files, output findings as:
file:line - [rule-id] description of issue
Example:
components/modal/index.tsx:45 - [timing-under-300ms] Exit animation 400ms exceeds 300ms limit
components/button/styles.module.css:12 - [physics-active-state] Missing :active transform
Summary Table
After findings, output a summary:
| Rule | Count | Severity |
|---|---|---|
timing-under-300ms | 2 | HIGH |
physics-active-state | 3 | MEDIUM |
easing-entrance-ease-out | 1 | MEDIUM |
References
Related skills
More from raphaelsalaja/skill and the wider catalog.

userinterface-wiki
152 UI/UX best practices across 12 categories for animations, CSS, audio, typography, and UX patterns.

vibe-security
Audit codebases for AI-introduced security vulnerabilities in rapidly-built applications.

apple-mail
Control Apple Mail on macOS—read, send, search, and manage emails via AppleScript.
react-aria
Test utilities for React Aria Components with simulated user interactions.

upgrade-react-native
>
react-spectrum-s2
Build UIs with React Spectrum S2 (Spectrum 2), Adobe's component library for React. Use when developers are using `@react-spectrum/s2` or need Adobe design system components. Includes React Aria Components docs as a reference for building custom components on top of unstyled primitives.