Build Modals in Minutes with the Dialog Element

Build Modals in Minutes with the Dialog Element

Kevin Powell via YouTube Direct link

- Introduction

1 of 12

1 of 12

- Introduction

Class Central Classrooms beta

YouTube videos curated by Class Central.

Classroom Contents

Build Modals in Minutes with the Dialog Element

Automatically move to the next video in the Classroom when playback concludes

  1. 1 - Introduction
  2. 2 - the basics of the dialog element
  3. 3 - opening the dialog with .show and .showModal
  4. 4 - adding a button to close the dialog
  5. 5 - dealing with autofocus
  6. 6 - make the close button accessible
  7. 7 - styling them - there are a lot of user agent styles!
  8. 8 - prevent the page from scrolling when a modal is opened
  9. 9 - styling the backdrop
  10. 10 - only add flex or grid on the opened state
  11. 11 - use case for the .show method
  12. 12 - overcoming positioning issues that you might run into

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.