Polish & Motion · 8 min read · Beginner
Smooth Transitions & Micro-Interactions
Add purposeful motion using GPU-friendly `transform` and `opacity` transitions while respecting `motion-reduce:`.
What you'll learn
- Animate `transform` and `opacity` instead of `width` or `top` for 60fps smoothness
- Keep UI transitions snappy (`duration-150` or `duration-200`)
- Use `active:scale-95` for subtle tactile button press feedback
Overview
Add purposeful motion using GPU-friendly transform and opacity transitions while respecting motion-reduce:.
Code Example
<button class="rounded-2xl bg-blue-600 px-5 py-3 font-semibold text-white transition duration-200 hover:-translate-y-0.5 hover:bg-blue-700 active:translate-y-0 motion-reduce:transition-none">
Start Learning
</button>
Key Takeaways
- Animate
transformandopacityinstead ofwidthortopfor 60fps smoothness - Keep UI transitions snappy (
duration-150orduration-200) - Use
active:scale-95for subtle tactile button press feedback
Quick Check
Check Your Understanding
Score: 0 / 1
1. Which two CSS properties are cheapest for browsers to animate smoothly at 60fps?
Study Workspace
Finished this lesson?
Your progress is saved locally in your browser, no account needed.