Skip to content
Guest
Tailwind CSS · Course Syllabus Show lessons
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 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

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.

Search courses, lessons, and references

Type to search across all courses, lessons, and quick references.

Press Esc to close Powered by Pagefind