Use Dialog for the Easiest Way to make a Popup Modal

Ever needed to make a modal? Well, we have a native HTML element that does the job with the dialog element! It does a lot of things out of the box that are really awesome, so let’s see how it works!

00:00 - Introduction

00:54 - What we're starting with

01:22 - Adding the dialog element

03:07 - The show() method

03:48 - The showModal() method

04:20 - Closing the modal with close()

05:00 - Closing the modal with a form submission

06:31 - Styling the backdrop

07:46 - The default styling


https://codepen.io/kevinpowell/pen/KKyOYvM