Pseudo-classes - Hover,focus and active
Pseudo-classes - Hover,focus and active

Handling Hover,Focus and Other States

Example 1:

<button class="bg-violet-500 hover:bg-violet-600 active:bg-violet-700 focus:outline-none focus:ring focus:ring-violet-300 ...">
Save changes
</button>

Traditional CSS

.btn-primary {
background-color: #0ea5e9;
}
.btn-primary:hover {
background-color: #0369a1;
}

Pseudo classes - Hover, focus and active

Reference

https://tailwindcss.com/docs/hover-focus-and-other-states