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.mdApply 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 change | Duration |
|---|---|
| Hover, press, colour and opacity on small controls | 120-160ms |
| Small element enters or leaves (tooltip, toast, chip) | 180-240ms |
| Panel, sheet, dropdown, card expand | 260-340ms |
| Full page or screen transition | 350-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
linearfor 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
- Animate only
transformandopacitywhere possible; avoid animatingwidth,height,topandleft(use layout animation or FLIP instead). - Stagger lists by 30-50ms per item and cap the total stagger at about 300ms.
- Keep distance small: elements travel 4-16px when appearing, not across the screen.
- Every animation must be interruptible: clicking again mid-animation should reverse smoothly, not wait.
- 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?