Popover
A floating panel anchored under its button: dropdown menus and small pop-ups. Built on the native popover attribute, so clicking away closes it.
| Name | Type | What it does |
|---|---|---|
popover | component | On any element with the popover attribute, opened by a button with popovertarget |
Dropdown menu
<button class="btn" popovertarget="demo-menu">Account ▾</button>
<ul popover id="demo-menu" class="popover menu">
<li><a href="#">Profile</a></li>
<li><a href="#">Billing <span class="meta">Pro</span></a></li>
<li><button>Sign out</button></li>
</ul>Popover with content
Popover
Anchored under its button. Click away to close.
<button class="btn" popovertarget="demo-pop">What's this?</button>
<div popover id="demo-pop" class="popover" style="max-width: 16rem; padding: 1rem">
<p class="card-title">Popover</p>
<p>Anchored under its button. Click away to close.</p>
</div>