HTML popovertargetaction Attribute
The popovertargetaction attribute sets what a popover control button does: toggle (the default), show or hide.
Description
The popovertargetaction attribute sets what a popover control button does to the popover named in its popovertarget attribute: toggle it (the default), only show it, or only hide it.
Popovers are elements with the global popover attribute. They are shown in the top layer above other content and, by default, close automatically when the user clicks outside them or presses Esc. The popovertarget and popovertargetaction attributes let a button open and close a popover without any JavaScript.
Syntax
<button popovertarget="id" popovertargetaction="toggle | show | hide">
Values
- toggleThe default. Shows the popover if it is hidden, hides it if it is showing.
- showOnly shows the popover.
- hideOnly hides the popover.
Applies To
Example
Browser Support
The following information will show you the current browser support for the HTML popovertargetaction attribute. Hover over a browser icon to see the version that first introduced support for this HTML attribute.
Desktop





Tablets & Mobile





