Popper

v2.11.8

Positioning engine for tooltips, popovers and dropdown menus.

Quick start

Add this tag to your page. Place it just before the closing </body> tag, or in the <head> with the defer attribute.

HTML
<script src="https://jscdns.net/libs/popper/2.11.8/popper.min.js"
        integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r" crossorigin="anonymous"></script>

Files

FileSizeCopy
popper.min.jsScript 19.7 KB
popper-lite.min.jsScript 13.2 KB

Usage

Complete example

A minimal page that loads Popper and uses it. Copy it into a file and open it in your browser.

example.html
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
</head>
<body>
  <button id="anchor">Hover target</button>
  <div id="tip" role="tooltip">I am positioned by Popper</div>

  <script src="https://jscdns.net/libs/popper/2.11.8/popper.min.js"
          integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r" crossorigin="anonymous"></script>
  <script>
    const anchor = document.querySelector('#anchor');
    const tip = document.querySelector('#tip');

    Popper.createPopper(anchor, tip, {
      placement: 'top',
      modifiers: [{ name: 'offset', options: { offset: [0, 8] } }]
    });
  </script>
</body>
</html>
Good to know. Only needed on its own if you load bootstrap.min.js rather than the bundle, or if you are building custom floating elements.