Home
cd ../playbooks
Developer ToolsIntermediate

Web Animation Design Principles

Design web animations that feel natural and purposeful — a decision-first easing blueprint (ease-out for entrances, ease-in-out for movement, ease for hover), duration and frequency rules, spring configuration, the GPU-only performance rule, and mandatory prefers-reduced-motion accessibility patterns with working CSS and Framer Motion code.

5 minutes
By Emil Kowalski (animations.dev)Source
#css-animation#framer-motion#web-performance#accessibility#frontend#ui-design

Most 'janky' web animations aren't a performance problem — they're using ease-in-out on a modal that should use ease-out, or animating height and padding instead of transform and opacity, and the fix is a handful of decision rules that take longer to explain than to apply.

Who it's for: frontend developers implementing UI animations who want a decision rule instead of trial and error, designers and engineers debating which easing curve to use for a given interaction, teams auditing an interface for animations that feel janky, sluggish, or overused, anyone who needs a concrete prefers-reduced-motion implementation instead of a vague accessibility reminder

Example

"This modal animation feels off" → A markdown table diagnosis (before/after CSS) identifying the wrong easing curve or duration against the decision rules — ease-in-out swapped for ease-out since the modal is entering the screen, duration trimmed to the 200-300ms modal range, and a prefers-reduced-motion media query added since the original had none

CLAUDE.md Template

New here? 3-minute setup guide → | Already set up? Copy the template below.

Or install from your terminal:
npx ccplaybooks add web-animation-design
# Web Animation Design

Design and implement web animations that feel natural and purposeful, based on the practical principles behind well-regarded animation courses like Emil Kowalski's "Animations on the Web." Use it for easing, timing, duration, springs, transitions, and animation performance — how to animate a specific UI element, which easing to use, and accessibility considerations for motion.

## Quick Start

Every animation decision starts with these questions:

1. **Is this element entering or exiting?** → Use `ease-out`.
2. **Is an on-screen element moving?** → Use `ease-in-out`.
3. **Is this a hover/color transition?** → Use `ease`.
4. **Will users see this 100+ times a day?** → Don't animate it.

Get new playbooks like this one

One email a week with new Claude Code workflows. Free, like everything here.

No spam. Unsubscribe anytime.

README.md

What This Does

A decision-first reference for web animation, distilled from Emil Kowalski's "Animations on the Web" course, that replaces animation guesswork with four questions: is the element entering/exiting (use ease-out), moving on screen (use ease-in-out), a hover/color change (use ease), or something seen 100+ times a day (don't animate it at all). A full easing blueprint gives ready-to-use cubic-bezier values sorted weak-to-strong for each category, a duration table by element type (100–150ms for micro-interactions up to 200–300ms for modals), and the "paired elements" rule — anything that visually moves together (a modal and its overlay, a tooltip and its arrow) must share identical easing and duration or the pairing reads as broken.

It covers spring animations (when they beat fixed-duration easing — drag interactions, interruptible gestures — and Apple's duration+bounce configuration over raw physics parameters), the hard performance rule of animating only transform and opacity since they skip layout and paint entirely, and a non-negotiable accessibility section: every animated element needs its own prefers-reduced-motion media query with real CSS and a Framer Motion useReducedMotion hook example, not a general reminder to "consider accessibility." A practical-tips table closes it out with nine specific fixes for common animation complaints — jittery motion, popovers scaling from the wrong origin, buttons that don't feel responsive on press.


Quick Start

Step 1: Create a Project Folder

mkdir web-animation && cd web-animation

Step 2: Download the Template

Click Download above, then:

mv ~/Downloads/CLAUDE.md ./

Step 3: Design or Review Animations

claude

Ask Claude to add an animation to a component, or to review an existing one that "feels off." It will apply the easing/duration decision rules, check for the accessibility media query, and — when reviewing — present before/after CSS in a markdown table showing exactly what changed and why.


Tips & Best Practices

  • Apply the frequency rule aggressively — an animation on something a power user triggers dozens of times a session (like a command palette) should be minimal to nonexistent, however nice it looks in isolation.
  • Never ship an animation without its matching prefers-reduced-motion query; treat it as part of the animation, not an optional accessibility add-on done later.
  • When something still feels subtly wrong after fixing easing and duration, try the "add subtle blur under 20px" trick before reaching for a bigger rewrite — it masks a surprising number of minor timing mismatches.

Limitations

  • Principles and CSS/Framer Motion examples specifically — a team on GSAP, React Spring, or a native mobile animation system will need to translate the underlying rules (easing choice, duration, GPU-only properties) into that framework's API.
  • The duration and frequency guidance reflects product-UI conventions; a marketing page or brand experience intentionally has looser rules, as the guide itself notes.
  • Spring configuration examples assume Framer Motion's duration+bounce API; a different spring-physics library will need the raw mass/stiffness/damping values translated to its own parameter names.

$Related Playbooks

Developer Tools

Web Technique to Skill Extractor

Turn a one-off web visual or interaction technique into a reusable, well-scoped skill — the one-sentence mechanism test that separates a real technique from mere styling, a mechanism-vs-staging sort for what belongs in the skill versus the demo, rules anchored to named failures instead of adjectives, and a demo craft bar that treats the acceptance reference as a target, not inspiration.

10 minutes
Advanced
Developer Tools

Planning with Files

Persistent, file-based planning for multi-step AI-agent work — task_plan.md, findings.md, and progress.md on disk, a 2-action rule for capturing multimodal findings before they're lost, a 3-strike error protocol, and a 5-question reboot test to verify state survives a compaction.

5 minutes
Intermediate
Developer Tools

Secret Scan and Rotation

Find committed credentials in a repository's working tree and full history, triage real secrets from test fixtures, and drive rotation-first remediation — with an absolute rule against ever printing a secret's actual value, even during the scan itself.

5 minutes
Intermediate
Developer Tools

Self-Improvement Loop Design

Design systems where the harness itself is the optimization target — an optimization ladder from prompt to context to workflow to harness code, a two-split empirical acceptance gate, an outside-the-loop invariant for the evaluator, and a catalog of documented reward-hacking and collapse failure modes.

10 minutes
Advanced
Developer Tools

Skill Security Inspector

Review an AI agent skill before installing it using two independent lines — static scanner evidence plus source-aware semantic judgment — checking purpose fit, permission fit, sensitive access, external transmission, execution risk, and persistence, down to a clear APPROVE, CAUTION, or REJECT verdict.

10 minutes
Intermediate
Developer Tools

Writing for AI Agents: A Craft Reference

A theory of writing any document an agent consumes — skills, CLAUDE.md, reference docs — built on context pointers, an information hierarchy of steps versus disclosed reference, completion criteria, and leading words that anchor behavior in the fewest tokens.

10 minutes
Advanced
Developer Tools

Windows RDP Connection Doctor

Diagnose Windows App / AVD / W365 remote-desktop connection quality on macOS — transport selection (UDP Shortpath vs WebSocket), VPN/proxy interference with STUN/TURN, and Shortpath failures from the logs.

15 minutes
Intermediate
Developer Tools

Who Built This Before Me

Check whether your project, tool, library, or product idea has already been built — before you invest a weekend or a quarter in it.

5 minutes
Intermediate
Developer Tools

Vibe Skill Creator

Build world-class Claude skills through a guided 10-step conversation — explore where Claude fails by default, research the domain, draft, self-critique, test on a real scenario, and iterate until the skill actually improves output.

10 minutes
Intermediate
Developer Tools

Office MCP Server Setup

MCP server with 39 tools for Word, Excel, PowerPoint, PDF, OCR operations

10 minutes
Intermediate
Developer Tools

Webhook Automation Builder

Build and manage webhook-based integrations for real-time event processing and API connections

10 minutes
Advanced
Developer Tools

Web App Testing

Test local web applications with Playwright automation for frontend verification, UI debugging, and screenshot capture.

15 minutes
Intermediate

Browse all Developer Tools playbooks →