The popoverglobal attribute marks an element as a popover — content that can float above the page in the browser top layer. Pair it with showPopover() / hidePopover() or a button that uses popovertarget.
Use popovers for menus, teaching tips, and lightweight overlays. Prefer <dialog> when you need a true modal dialog with focus-trapping semantics. For background UI, consider inert.
Widely available · 2024+.
Supported in current Chrome, Edge, Firefox, and Safari. Feature-detect ("popover" in HTMLElement.prototype) for older browsers.
hint is newer.
Prefer auto / manual for critical UI. Use hint only as enhancement where supported.
Syntax
HTML Syntax
syntax.html
<element popover[="auto|manual|hint"]>
Empty value or auto means auto. Give the popover an id so buttons can target it with popovertarget.
showPopover / hidePopover control visibility from script.
manual fits transient toasts you dismiss on a timer.
hint is for non-modal tips that should not fight auto popovers.
Feature-detect before relying on hint in production.
Edge Cases & Pitfalls
Top-layer promotion is free — focus and positioning are still your job.
focus
Manage focus thoughtfully
Move focus into the popover when opened for keyboard users, and restore it on close.
css
Positioning is still your job
The attribute promotes to the top layer; place the popover with CSS (anchor positioning or absolute offsets).
support
Feature-detect older browsers
Offer a non-popover fallback when HTMLElement.prototype.showPopover is missing.
hint
hint support varies
Keep critical UI on auto/manual until hint is universally safe for your audience.
Compatibility
Browser Support
popover is an HTML attribute for browsers. It is not a Node.js, Deno, or Bun API.
✓ Widely available · 2024+
popover
Modern Chromium, Firefox, and Safari support the Popover API. Detect before shipping critical UI. hint is newer.
92%Global support (approx.)
Google Chrome114+ · hint newer
Full support
Mozilla Firefox125+
Full support
Apple Safari17+
Full support
Microsoft Edge114+
Full support
Opera100+
Full support
Samsung Internet23+
Full support
Internet ExplorerNo support
Not supported
popoverModern browsers
Bottom line: Safe for progressive enhancement. Keep a fallback for older browsers. Treat hint as optional.
Remember
Key Takeaways
Role: promote UI into the top-layer popover stack.
Values: auto (default), manual, hint.
Controls:popovertarget or showPopover().
Not dialog: use <dialog> for true modals.
One line:popover floats UI in the top layer — auto dismisses, manual stays, hint tips softly.
Frequently Asked Questions
It turns an element into a popover that can appear in the browser top layer. Values include auto (light-dismiss), manual (script-controlled), and hint (non-disruptive hints where supported).
Call element.showPopover() / hidePopover() / togglePopover(), or use a button with popovertarget pointing at the popover’s id.
auto popovers close on outside click or Escape and usually allow only one auto popover at a time. manual popovers stay until you hide them in script (or with a matching toggle).
hint is for non-modal, non-light-dismiss teaching tips that should not steal the auto popover stack. Support is newer — feature-detect before relying on it.
No. dialog is for modal or non-modal dialogs with richer dialog semantics. popover is for lightweight overlays like menus and tooltips.
auto/manual are widely available in modern Chromium, Firefox, and Safari. Treat hint as progressive enhancement.