DEV Community

Cover image for How to create a JavaScript-free modal popup with only Tailwind CSS
Michael Andreuzza
Michael Andreuzza

Posted on

How to create a JavaScript-free modal popup with only Tailwind CSS

Happy Monday everyone! Today, we are going to create a JavaScript-free modal popup using only Tailwind CSS, because we can. This is a great way to add interactivity to your website without using JavaScript.

Why a modal without JavaScript?
Using a modal without JavaScript can simplify your codebase, reduce the amount of dependencies, and improve loading times.

Read the article, see it live and get the code.

Top comments (2)

Collapse
 
rafael_reale_cc689f988c49 profile image
Rafael Reale

it's bugged.

Collapse
 
mike_andreuzza profile image
Michael Andreuzza • Edited

its because I updated to Tailwind V4....thank you for the heads up! Now its up and running fine :-), I forgot the colors
Image description