Animation skill · Foundations

Motion foundations

Timing, easing and spring defaults every animation should start from.

Give this skill to your AI agent

Run this in your project. Claude Code picks it up from .claude/skills; for other agents, paste the file into their rules.

mkdir -p .claude/skills/motion-foundations && curl -fsSL https://kitesmotion.com/skills/motion-foundations/SKILL.md -o .claude/skills/motion-foundations/SKILL.md
Download SKILL.md

Apply these defaults whenever you add, change or review an animation in a user interface. Prefer these values over inventing new ones so motion feels consistent across the product.

When motion is worth it

Animate to explain a change: where something came from, where it went, what changed state, or that the app is working. Do not animate for decoration on screens people use many times a day.

Durations

Kind of changeDuration
Hover, press, colour and opacity on small controls120-160ms
Small element enters or leaves (tooltip, toast, chip)180-240ms
Panel, sheet, dropdown, card expand260-340ms
Full page or screen transition350-450ms

Exits are about 20% faster than entrances. Never exceed 500ms for anything the user waits on.

Easing

  • Entering: cubic-bezier(0.16, 1, 0.3, 1) (fast start, soft landing).
  • Leaving: cubic-bezier(0.7, 0, 0.84, 0) (gentle start, quick finish).
  • Moving on screen: cubic-bezier(0.65, 0, 0.35, 1).
  • Never use linear for movement; keep it for progress bars, spinners and scroll-linked effects.

Springs

Use springs for anything the user drags, flicks or interrupts. Presets:

  • Snappy (buttons, toggles): stiffness 500, damping 32, mass 1.
  • Smooth (cards, sheets, layout): stiffness 300, damping 30.
  • Bouncy (playful, rare): stiffness 400, damping 15.
  • SwiftUI equivalents: .spring(response: 0.3, dampingFraction: 0.85), .spring(response: 0.45, dampingFraction: 0.82), .spring(response: 0.4, dampingFraction: 0.6).

Motion tokens

Define motion as tokens and reuse them:

css:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-1: 140ms;
  --dur-2: 220ms;
  --dur-3: 320ms;
  --dur-4: 420ms;
}

Rules

  1. Animate only transform and opacity where possible; avoid animating width, height, top and left (use layout animation or FLIP instead).
  2. Stagger lists by 30-50ms per item and cap the total stagger at about 300ms.
  3. Keep distance small: elements travel 4-16px when appearing, not across the screen.
  4. Every animation must be interruptible: clicking again mid-animation should reverse smoothly, not wait.
  5. Respect prefers-reduced-motion (see the reduced-motion skill).

Checklist before shipping

  • Does each animation explain a change?
  • Are durations and easings taken from the tokens?
  • Does it still feel right at 0.25x speed and when spammed?
  • Is there a reduced-motion version?

More skills