Open this example in the interactive library
Source code
<button
class="demo transition-colors duration-300 hover:text-white hover:bg-teal-900"
type="button"
>
Try this button
</button>
Transition only text and background colours with Tailwind CSS 4 utilities. The preview uses precompiled styles.
Open this example in the interactive library
<button
class="demo transition-colors duration-300 hover:text-white hover:bg-teal-900"
type="button"
>
Try this button
</button>