Popover Playground - Interactive Lab | IconVault

Master the native popover API: auto vs manual, toggle events, anchor-positioned tooltips and menus. Free, runs in your browser.

All tools

Popover Playground

Native popovers plus anchor-positioned tooltips and menus

5 of 5 free uses left
Support:popover API unsupportedanchor positioning unsupported, falls back to centerPopovers render in the top layer: above everything, no z-index fights, no portals.

Demo

Mode

Auto: closes on outside click and Escape. Only one auto popover open at a time.

Position (anchor)

Implemented with position-area, no JavaScript measuring.

Live demo

Click the trigger. In auto mode, click outside or press Escape to dismiss.

A native tooltip. No libraries, no portals, styled with plain CSS.

toggle events

Open and close the popover to see toggle events.

Copy-ready code

<!-- Anchor button -->
<button id="anchor" popovertarget="tip">
  Hover or tap me
</button>

<!-- Auto popover, anchor-positioned -->
<div id="tip" popover class="tip">
  A native tooltip. No JavaScript needed.
</div>

<style>
  #anchor { anchor-name: --tip-anchor; }
  .tip {
    position-anchor: --tip-anchor; /* tie popover to its button */
    position-area: bottom;        /* top | bottom | left | right */
    margin: 8px;
  }
</style>

<script>
  const tip = document.getElementById("tip");
  // Auto popovers close on outside click and Escape
// and listen for the "toggle" event:
tip.addEventListener("toggle", (e) => {
  console.log(e.oldState, "->", e.newState);
});
</script>

5 of 5 free copies left.

About this tool

IconVault's Popover Playground teaches the native popover API hands-on: switch between auto and manual modes, position popovers with CSS anchor positioning, watch toggle events fire, and build tooltips, menus and cards with zero libraries. It is free to use and runs fully in your browser with nothing uploaded.

How to use: pick a demo, choose auto or manual mode, set the anchor position, and click the trigger. The copy-ready code panel mirrors your exact setup. Perfect for developers replacing JS tooltip libraries with the built-in top-layer API.

Frequently asked questions

Popular searches

popover apihtml popover attributepopover css examplepopover vs dialogpopover auto vs manualshowpopover examplehidepopover javascriptpopover toggle eventcss anchor positioningposition-area cssanchor-name csspopover anchor positioningnative tooltip htmlpopover menu examplehtml popover tutoriallearn popover apipopover browser supportpopover polyfillpopovertarget attributepopovertargetactionpopover top layercss top layerpopover z-indexanchor css functionposition-anchor csstooltip without javascriptnative html tooltippopover dialog differencemodal vs popovernon modal popoverlight dismiss popoverpopover accessibilitypopover keyboard escapecss anchor examplesanchor positioning tutorialpopover position top bottompopover css stylingstyle popover elementpopover backdroppopover backdrop csspopover api mdnpopover reactpopover demoanchor positioned tooltipcss anchoringpopover best practiceshtml popover guidelearn html popoverpopover playgroundpopover lab online

More tools

Coming soon

CLI

Coming soon

Figma plugin

Coming soon

VS Code extension

Coming soon

Chrome extension

Coming soon

AI icon generator

Coming soon

Team workspaces

Coming soon

View all 10+ tools →