Animation
Guidelines for building natural-feeling animations. Click the interactive examples to compare correct vs incorrect approaches.
Easing: Enter & Exit
Use ease-out for elements entering or exiting. The fast start feels responsive.
Starts slow, feels sluggish and unresponsive
Starts fast, feels responsive and snappy
Easing: On-Screen Movement
Use ease-in-out for elements moving on screen. Mimics natural acceleration and deceleration.
Decelerates only. Works, but less natural for on-screen movement.
Accelerates then decelerates. Mimics natural motion like a car.
Duration
Keep UI animations under 300ms. Faster feels more connected to user actions.
Feels disconnected from user action
Feels connected and responsive
Scale Starting Point
Don't animate from scale(0). Start from 0.95+ for a gentle, natural entrance.
Appears from nothing. Feels unnatural and jarring.
Gentle entrance. Like a balloon that's always visible.
Transform Origin
Set transform-origin to the trigger location. Popovers should scale from their source.
Scales from middle. Disconnected from trigger.
Scales from trigger. Feels connected and intentional.
Button Press Feedback
Add subtle scale-down on active state. Makes the UI feel alive and responsive.
No visual response. Feels static and unresponsive.
Subtle scale on press. UI feels alive and listening.
Custom Easing Curves
Built-in CSS easings have weak acceleration. Use custom cubic-bezier curves.
Weak acceleration. Feels soft and floaty.
Strong acceleration. Feels snappy and intentional.
Easing Reference
Recommended curves sorted by acceleration strength (quad → quint).
ease-out (enter/exit)
| quad | cubic-bezier(0.25, 0.46, 0.45, 0.94) |
| cubic | cubic-bezier(0.215, 0.61, 0.355, 1) |
| quart | cubic-bezier(0.165, 0.84, 0.44, 1) |
| quint | cubic-bezier(0.23, 1, 0.32, 1) |
ease-in-out (on-screen)
| quad | cubic-bezier(0.455, 0.03, 0.515, 0.955) |
| cubic | cubic-bezier(0.645, 0.045, 0.355, 1) |
| quart | cubic-bezier(0.77, 0, 0.175, 1) |
| quint | cubic-bezier(0.86, 0, 0.07, 1) |
Key Principles
- Avoid ease-in — starts slow, makes UI feel sluggish
- Never animate keyboard interactions — repeated actions should be instant
- Prefer transform & opacity — GPU-accelerated, no layout thrashing
- Use will-change sparingly — fixes shaky animations but consumes GPU memory