Hover and Focus States
Make interfaces interactive using hover, focus and transition utilities.
Learning approach
Study the Tailwind classes in the example, run the preview, then modify the classes and observe how the design changes.
Tailwind Example
HTML + Tailwind CSS
<button
class="px-6 py-3 bg-indigo-600 text-white rounded-xl
transition hover:bg-indigo-700
hover:-translate-y-1">
Hover Me
</button>
Live Preview
Your Tailwind design will appear here.
Click Run Preview
See the lesson example here.
Test your understanding
Choose the best answer.
Which prefix is commonly used for medium-screen responsive styles?