— by Nesim


The HTML Dialog element is a native browser element that can be used to create modal dialogs. It only needs a bit of JavaScript to work, and brings a lot of accessibility features out of the box – like focus trapping and pressing Escape to close.

Session CodePen

See this Pen on CodePen.

Browser Support