Turns an element into a popover.

Published on Updated on

The popover property of the HTMLElement interface turns an element into a popover. It is the DOM definition of the HTML popover attribute.


A string that can take one of the following values:

The popover exhibits the standard behavior explained at The Popover API: concepts and usage.
Manual popovers cannot be light dismissed, they can only be dismissed by an explicit trigger element (created for example using popovertoggletarget) or by JavaScript (using hidePopover()), and they don't automatically dismiss previously-shown popovers.


const popover = document.getElementById('my-popover');

// get

// set
popover.popover = 'manual';

Browser compatibility

See also

Updated on Improve article

We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.