popover component

Drop-in semantic component. See examples, sizes, variants, and source.

Rich, interactive overlay anchored to a trigger element. Wrap content in a popover inside a popover-overlay, give it an id, then point any trigger at it with data-popover="popover-id". Position with data-position (top, bottom, left, right, plus -start / -end alignment). Open/close, focus trapping, and animations are handled by popover.js.

Popover System

Basic Popover

Popover Sizes

Tiny Popover

Small Popover

Large Popover

Positioning

Top Positions

Bottom Positions

Feature Variations

Popover with Icon

Popover with Footer Actions

Popover with Text Stepper

Color Themes

Themed Popovers

JavaScript API

Programmatic Control

// Open a popover Popover.open('my-popover', triggerElement); // Close a specific popover Popover.close('my-popover'); // Close all open popovers Popover.closeAll(); // Toggle a popover Popover.toggle('my-popover', triggerElement); // Check if popover is open if (Popover.isOpen('my-popover')) { console.log('Popover is open'); }

Popover Events

// Listen for open event $('#my-popover').on('popover:open', function(e, popoverId) { console.log('Popover opened:', popoverId); }); // Listen for close event $('#my-popover').on('popover:close', function(e, popoverId) { console.log('Popover closed:', popoverId); });

Class API Reference

Type Class / Attribute Usage Notes
Base popover-overlay Outer fixed-position layer; carries the data-position Start with hidden class
popover The card itself — header, body, footer, tail 372px wide by default
popover-tail Arrow that points back at the trigger Hide with .no-tail on .popover
data-popover="id" Trigger attribute that wires to a popover by id Place on any focusable element
Sizes xs 280px wide — tiny Modifier on popover
sm 320px wide — small Modifier on popover
(default) 372px wide — medium No size class needed
xl 480px wide — large Modifier on popover
lg 600px wide — big Modifier on popover
Position data-position="top|bottom|left|right" Side relative to trigger Goes on the popover-overlay
-start / -end suffix Edge alignment (e.g. top-start, bottom-end) Combine with the side
top|bottom|left|right Class form on .popover — same options Use either attribute or class
visible Activates pointer events + opacity transition Toggled by JS
Sections header Top row — icon, title, description, close Add .no-border to drop divider
title / description Header text rows Inside header > .content
icon-container Leading icon slot in header 20×20
content / body Main popover content area Padding scales with size
footer Bottom row — stepper text + actions Hosts .step and .actions
button close Close button in the header Auto-wired by JS
Themes primary Blue tinted background Modifier on popover
positive Green tinted background Modifier on popover
negative Red tinted background Modifier on popover
warning Yellow tinted background Modifier on popover
info Light-blue tinted background Modifier on popover