43 rules for building better web animations. Includes timing, easing, performance, and accessibility patterns for React, CSS, and Framer Motion.
This skill codifies 43 essential rules for creating tasteful, performant, and accessible UI animations, distilled from the principles of Emil Kowalski (animations.dev).
ease-out as the default for UI elements appearing. It feels snappy and responsive.cubic-bezier(.4, 0, .2, 1) (Inter) or similar curves over browser defaults like ease.linear unless animating continuous properties like colors or opacity in a long transition.damping: 15, stiffness: 150) for physical elements like modals, drawers, and draggable items.width, height, top, left, margin, or padding unless absolutely necessary (use scale/translate instead).will-change: transform only when an animation is about to happen to prevent GPU memory bloat.Framer Motion's layout prop to handle FLIP animations performantly.0.95 to 1) rather than 0 to keep the UI legible during the transition.origin-center for buttons and origin-top for dropdowns to make the growth feel natural.prefers-reduced-motion. Disable or simplify animations (e.g., fade instead of slide) when active.aria-live regions through animations to ensure screen readers are not confused by moving content.0.93 as a standard scale for press/click interactions ($clicked $scale).const variants = {
initial: { opacity: 0, y: 10, scale: 0.95 },
animate: {
opacity: 1,
y: 0,
scale: 1,
transition: {
duration: 0.2,
ease: [0.4, 0, 0.2, 1]
}
},
exit: {
opacity: 0,
transition: { duration: 0.15 }
}
}
transform and opacity?ease-out or spring curve for entry?prefers-reduced-motion?