Y

YouLibs

Remove Touch Overlay

Use dialog for the easiest way to make a popup modal

Duration: 09:40Views: 74KLikes: 4.5KDate Created: Mar, 2022

Channel: Kevin Powell

Category: Education

Tags: how tocssjavascript popupcss modalhtml css jscreate a modal using javascriptcss popupsimple modalhtml modalmodal popuphtmltutorialcreate a modalcreating a modaleasy modaljavascript popup boxdialog modaljavascript modal popuphtml popupjavascript modalcss popup boxkevin powellhtml dialogjs modaldialog elementcss modal popuppopup modalpopup boxfront-endfrontend

Description: 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! 🔗 Links ✅ Codepen: codepen.io/kevinpowell/pen/KKyOYvM ✅ The polyfill: github.com/GoogleChrome/dialog-polyfill ✅ a11y modal: a11y-dialog.netlify.app ✅ A great article that goes into a lot of detail on dialog: whistlr.info/2021/in-defence-of-dialog ✅ More info: developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog ⌚ Timestamps 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 #css -- Come hang out with other dev's in my Discord Community 💬 discord.gg/nTYCvrK Keep up to date with everything I'm up to ✉ kevinpowell.co/newsletter Come hang out with me live every Monday on Twitch! 📺 twitch.tv/kevinpowellcss --- Help support my channel 👨‍🎓 Get a course: kevinpowell.co/courses 👕 Buy a shirt: teespring.com/stores/making-the-internet-awesome 💖 Support me on Patreon: patreon.com/kevinpowell --- My editor: VS Code - code.visualstudio.com --- I'm on some other places on the internet too! If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter. Twitter: twitter.com/KevinJPowell Codepen: codepen.io/kevinpowell Github: github.com/kevin-powell --- And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!

Swipe Gestures On Overlay