Popovers

Documentation and examples for adding Bootstrap popovers, like those found in iOS, to any element on your site.
Read the official Bootstrap Documentation for a full list of instructions and other options.


Directions

Click on the buttons below to see the four popovers directions: top, right, bottom, and left.

<!-- Popover on right -->
<button type="button" class="btn btn-primary" data-bs-toggle="popover" data-bs-offset="0,14" data-bs-placement="right" data-bs-html="true" data-bs-content="<p>This is a very beautiful popover, show some love.</p> <div class='d-flex justify-content-between'><button type='button' class='btn btn-sm btn-label-secondary'>Skip</button><button type='button' class='btn btn-sm btn-primary'>Read More</button></div>" title="Popover Title">
  Popover on right
</button>

<!-- Popover on top -->
 <button type="button" class="btn btn-primary" data-bs-toggle="popover" data-bs-offset="0,14" data-bs-placement="top" data-bs-html="true" data-bs-content="<p>This is a very beautiful popover, show some love.</p> <div class='d-flex justify-content-between'><button type='button' class='btn btn-sm btn-label-secondary'>Skip</button><button type='button' class='btn btn-sm btn-primary'>Read More</button></div>" title="Popover Title">
   Popover on top
 </button>

<!-- Popover on bottom -->
<button type="button" class="btn btn-primary" data-bs-toggle="popover" data-bs-offset="0,14" data-bs-placement="bottom" data-bs-html="true" data-bs-content="<p>This is a very beautiful popover, show some love.</p> <div class='d-flex justify-content-between'><button type='button' class='btn btn-sm btn-label-secondary'>Skip</button><button type='button' class='btn btn-sm btn-primary'>Read More</button></div>" title="Popover Title">
  Popover on bottom
</button>
<!-- Popover on left -->

 <button type="button" class="btn btn-primary" data-bs-toggle="popover" data-bs-offset="0,14" data-bs-placement="left" data-bs-html="true" data-bs-content="<p>This is a very beautiful popover, show some love.</p> <div class='d-flex justify-content-between'><button type='button' class='btn btn-sm btn-label-secondary'>Skip</button><button type='button' class='btn btn-sm btn-primary'>Read More</button></div>" title="Popover Title">
   Popover on left
 </button>
const popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'));
const popoverList = popoverTriggerList.map(function(popoverTriggerEl) {
  return new Popover(popoverTriggerEl,{ html: true, sanitize: false });
});
Attribute Value
data-bs-placement="{value}" top | right | bottom | left

Dismiss on next click

Use the focus trigger to dismiss popovers on the user’s next click of a different element than the toggle element.

<button type="button" tabindex="0" class="btn btn-danger" role="button" data-bs-toggle="popover" data-bs-offset="0,14" data-bs-trigger="focus" data-bs-html="true" data-bs-content="<p>This is a very beautiful popover, show some love.</p> <div class='d-flex justify-content-between'><button type='button' class='btn btn-sm btn-label-secondary'>Skip</button><button type='button' class='btn btn-sm btn-primary'>Read More</button></div>" title="Dismissible popover">Dismissible popover</button>

Disabled Elements

Disabled popover triggers, you may also prefer data-bs-trigger="hover focus" so that the popover appears as immediate visual feedback to your users as they may not expect to click on a disabled element.

<span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-offset="0,14" data-bs-trigger="hover focus" data-bs-content="Disabled popover">
<button class="btn btn-primary" type="button" disabled>Disabled button</button>
</span>

Solid PRO

Create popovers with with solid variant by using data-color="{value}" attribute.

 <!-- Primary -->
<button type="button" class="btn btn-primary" data-bs-toggle="popover" data-bs-offset="0,14" data-bs-placement="right" data-color="primary" data-bs-content="This is a very beautiful popover, show some love." title="Popover title">
  Primary
</button>
<!-- Secondary -->
<button type="button" class="btn btn-secondary" data-bs-toggle="popover" data-bs-offset="0,14" data-bs-placement="right" data-color="secondary" data-bs-content="This is a very beautiful popover, show some love." title="Popover title">
  Secondary
</button>
<!-- Success -->
<button type="button" class="btn btn-success" data-bs-toggle="popover" data-bs-offset="0,14" data-bs-placement="top" data-color="success" data-bs-content="This is a very beautiful popover, show some love." title="Popover title">
  Success
</button>
<!-- Danger -->
<button type="button" class="btn btn-danger" data-bs-toggle="popover" data-bs-offset="0,14" data-bs-placement="top" data-color="danger" data-bs-content="This is a very beautiful popover, show some love." title="Popover title">
  Danger
</button>
<!-- Warning -->
<button type="button" class="btn btn-warning" data-bs-toggle="popover" data-bs-offset="0,14" data-bs-placement="left" data-color="warning" data-bs-content="This is a very beautiful popover, show some love." title="Popover title">
  Warning
</button>
<!-- Info -->
<button type="button" class="btn btn-info" data-bs-toggle="popover" data-bs-offset="0,14" data-bs-placement="bottom" data-color="info" data-bs-content="This is a very beautiful popover, show some love." title="Popover title">
  Info
</button>
<!-- Dark -->
<button type="button" class="btn btn-dark" data-bs-toggle="popover" data-bs-offset="0,14" data-bs-placement="top" data-color="dark" data-bs-content="This is a very beautiful popover, show some love." title="Popover title">
  Dark
</button>
Attribute Value
data-color="{value}" primary | secondary | success | danger | warning | info | dark
© 2017- ThemeSelection, Hand-crafted & Made with ❤️