@popperjs/core
A kickass library used to manage poppers in web applications
Last updated 5 years ago by fezvrasta .
MIT · Repository · Original npm · Tarball · package.json
$ npm install @popperjs/core 
SYNC missed versions from official npm registry.

PopperJS

Positioning tooltips (but also dropdowns, popovers, and more) has always been particularly painful.

PopperJS is here to help.

Give it a reference element (such as a button) and a popper element (your tooltip) and it will automatically put your tooltip in the right place.

PopperJS is a ~3 kB library that aims to provide a reliable and extensible positioning engine you can use to build your awesome UI. Why waste your time writing your own logic every time you are programming a tooltip?

This library can position any pair of elements in your document without needing to alter the DOM in any way. It doesn't care if your elements are not close to each other or are in two different scrolling containers, they will always end up in the right position.

But wait, it's not 1993 anymore, nowadays we write UIs using powerful abstraction libraries such as React or Angular. You'll be glad to know PopperJS can fully integrate with them and be a good citizen together with your other components. Check out react-popper for the official PopperJS wrapper for React.

Installation:

yarn add @popper/core@next

# or

npm install @popper/core@next

Usage

// Get your elements
const element = document.querySelector('#button');
const popper = document.querySelector('#tooltip');

// Let PopperJS do the magic!
new Popper(element, popper, { placement: 'right' });

Hacking the library

If you want to play with the library, implement new features, fix a bug you found, or simply experiment with it, this section is for you!

First of all, make sure to have Yarn installed.

Install the development dependencies:

yarn install

And run the development environment:

yarn dev

Then, simply open one the development server web page:

# macOS and Linux
open localhost:5000

# Windows
start localhost:5000

From there, you can open any of the examples (.html files) to fiddle with them.

Now any change you will made to the source code, will be automatically compiled, you just need to refresh the page.

If the page is not working properly, try to go in "Developer Tools > Application > Clear storage" and click on "Clear site data".
To run the examples you need a browser with JavaScript modules via script tag support.

Current Tags

  • 2.11.8                                ...           latest (a year ago)

75 Versions

  • 2.11.8                                ...           a year ago
  • 2.11.7                                ...           2 years ago
  • 2.11.6                                ...           2 years ago
  • 2.11.5                                ...           3 years ago
  • 2.11.4                                ...           3 years ago
  • 2.11.3                                ...           3 years ago
  • 2.11.2                                ...           3 years ago
  • 2.11.1 [deprecated]           ...           3 years ago
  • 2.11.0                                ...           3 years ago
  • 2.10.2                                ...           3 years ago
  • 2.10.1                                ...           3 years ago
  • 2.10.0                                ...           3 years ago
  • 2.9.3                                ...           3 years ago
  • 2.9.2                                ...           4 years ago
  • 2.9.1                                ...           4 years ago
  • 2.9.0                                ...           4 years ago
  • 2.8.6                                ...           4 years ago
  • 2.8.5                                ...           4 years ago
  • 2.8.4                                ...           4 years ago
  • 2.8.3                                ...           4 years ago
  • 2.8.2                                ...           4 years ago
  • 2.8.1                                ...           4 years ago
  • 2.8.0                                ...           4 years ago
  • 2.7.2                                ...           4 years ago
  • 2.7.1                                ...           4 years ago
  • 2.7.0                                ...           4 years ago
  • 2.6.0                                ...           4 years ago
  • 2.5.4                                ...           4 years ago
  • 2.5.3                                ...           4 years ago
  • 2.5.2                                ...           4 years ago
  • 2.5.1                                ...           4 years ago
  • 2.5.0                                ...           4 years ago
  • 2.4.4                                ...           4 years ago
  • 2.4.3                                ...           4 years ago
  • 2.4.2                                ...           4 years ago
  • 2.4.1                                ...           4 years ago
  • 2.4.0                                ...           5 years ago
  • 2.3.3                                ...           5 years ago
  • 2.3.2                                ...           5 years ago
  • 2.3.1                                ...           5 years ago
  • 2.3.0                                ...           5 years ago
  • 2.2.3                                ...           5 years ago
  • 2.2.2                                ...           5 years ago
  • 2.2.1                                ...           5 years ago
  • 2.2.0-bundlephobia.1                                ...           5 years ago
  • 2.2.0                                ...           5 years ago
  • 2.1.1                                ...           5 years ago
  • 2.1.0                                ...           5 years ago
  • 2.0.6                                ...           5 years ago
  • 2.0.5                                ...           5 years ago
  • 2.0.4                                ...           5 years ago
  • 2.0.3                                ...           5 years ago
  • 2.0.2                                ...           5 years ago
  • 2.0.1                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 2.0.0-rc.3                                ...           5 years ago
  • 2.0.0-rc.2                                ...           5 years ago
  • 2.0.0-rc.1                                ...           5 years ago
  • 2.0.0-alpha.4                                ...           5 years ago
  • 2.0.0-alpha.3                                ...           5 years ago
  • 2.0.0-alpha.2                                ...           5 years ago
  • 2.0.0-next.17                                ...           5 years ago
  • 2.0.0-alpha.1                                ...           5 years ago
  • 2.0.0-next.16                                ...           5 years ago
  • 2.0.0-next.15                                ...           5 years ago
  • 2.0.0-next.14                                ...           5 years ago
  • 2.0.0-next.13                                ...           5 years ago
  • 2.0.0-next.12                                ...           5 years ago
  • 2.0.0-next.11                                ...           5 years ago
  • 2.0.0-next.10                                ...           5 years ago
  • 2.0.0-next.9                                ...           5 years ago
  • 2.0.0-next.8                                ...           5 years ago
  • 2.0.0-next.7                                ...           5 years ago
  • 2.0.0-next.6                                ...           5 years ago
  • 2.0.0-next.5                                ...           5 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None

© 2010 - cnpmjs.org x YWFE | Home | YWFE