Advertisement

Google Ad Slot: content-top

Bootstrap 5 Popover

~1 min read · Bootstrap
On this page

In Bootstrap 5, a popover is a small overlay element that appears when users interact with an element (usually on hover or click).

Basic Popover:

The data-bs-toggle="popover" attribute is used to trigger a popover. You must also include the title and data-bs-content attributes for the header and body of the popover.

Example
Try it yourself

Positioning Tooltips:

You can control the position of the popover using the data-bs-placement attribute. Options include top, right, bottom, left, or auto.

Example
Try it yourself

Trigger Options:

Control how the popover is triggered using the data-bs-trigger attribute: click, hover, focus

Example
Try it yourself

Dismiss on Click Outside:

To dismiss them when clicking outside

Example
Try it yourself