DEV Community

Priyanka-Chettri
Priyanka-Chettri

Posted on

2

Unveiling the Magic of hover, focus and active variants in Tailwind CSS.

๐Ÿ’ก๐๐ซ๐จ ๐“๐ข๐ฉ: Make your UI elements pop with Tailwind CSS! Use ๐ก๐จ๐ฏ๐ž๐ซ, ๐Ÿ๐จ๐œ๐ฎ๐ฌ, and ๐š๐œ๐ญ๐ข๐ฏ๐ž variants to enhance user experience and engagement. Your designs will thank you!

Cover Page

Dive into this demo to see them in action!
Ready to give it a try? Check out the code below and start
experimenting! ๐Ÿ‘‡

โžก๏ธ Snippet of "hover" variant applied to a button.
Hover Code

โžก๏ธ Snippet of a "focus" variant applied to a button
Focus Code

โžก๏ธ Snippet of an "active" variant applied to a button
Active Code

Top comments (2)

Collapse
 
moopet profile image
Ben Sinclair โ€ข

Just a heads up that the Markdown we use here supports syntax highlighting, and is generally more accessible than inserting an image of code. Images of text are an issue for people using screen readers, for example, and their content won't get picked up by the site's search facility.

You can add code blocks with 3 backticks: code block with colors example More details in our editor guide!

Collapse
 
priyankachettri profile image
Priyanka-Chettri โ€ข

Noted. Thanks for the feedback!

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

๐Ÿ‘‹ Kindness is contagious

Please leave a โค๏ธ or a friendly comment on this post if you found it helpful!

Okay