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.
Popover Playground
Native popovers plus anchor-positioned tooltips and menus
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
More tools
Algorithm Visualizer
Watch sorting and searching animate step by step
Alt Text Helper
Write better image alt text with live feedback
ARIA Reference
Searchable ARIA roles and attributes guide
Array Visualizer
Step through map, filter, reduce like a debugger
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