How To Make Modals With The HTML Dialog Tag
Using both Vanilla JS and React
9 min readFeb 8, 2024
A “modal” is a pop up that a site can use to display more information or interactivity. Usually, if we need one, we build it ourselves. But that can be tricky; the biggest pain points about modals are making sure to show/close them at the right times, the CSS, and blocking interactions from happening outside of it. And they must be…