1 / 1
Native Popover Dialog, No Library
A button with popovertarget and an element with popover is the whole implementation. The browser puts it in the top layer, closes it on Escape, closes it when you click outside, and hands you ::backdrop to style — none of which you wrote. The script here only opens it on a loop so the demo plays; the open and close buttons are pure markup.
popoverdialogmodalhtmltop layerno javascript