VOOZH about

URL: https://www.geeksforgeeks.org/bootstrap/bootstrap-5-popovers-using-function-with-popperconfig-options/

⇱ Bootstrap 5 Popovers Using function with popperConfig Options - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Bootstrap 5 Popovers Using function with popperConfig Options

Last Updated : 23 Jul, 2025

Bootstrap 5 Popover is a feature of Bootstrap that allow you to display a small popup over the element when an element is clicked or hovered over.

Bootstrap 5 Popovers Using function with popperConfig Options: Popover popperConfig option is used to customize the behavior of the popover. The popperConfig option is an object that contains a set of options and modifiers that control the placement and behavior of the popover.

Syntax :

var popover = new bootstrap.Popover(element, {
 popperConfig: function (defaultBsPopperConfig) {
 }
})

Example 1: In this example, we place the popover on the right of element by using the popperConfig option.

Output:

👁 Bootstrap 5 Popovers Using function with popperConfig Options
Bootstrap 5 Popovers Using function with popperConfig Options

Example 2: In this example, we will pass various popover options using the popperConfig option.

Output :

👁 Bootstrap 5 Popovers Using function with popperConfig Options
Bootstrap 5 Popovers Using function with popperConfig Options

Reference: https://getbootstrap.com/docs/5.0/components/popovers/#using-function-with-popperconfig

Comment

Explore