A vue component of popper.js, and the arrow position control is implemented


stars 🌟issues ⚠️updated πŸ› created 🐣size πŸ‹οΈβ€β™€οΈ
50May 17, 2020Sep 6, 2018Minified + gzip package size for @livelybone/vue-popper in KB



NPM Version Download Month gzip with dependencies: 8.8kb typescript pkg.module

pkg.module supported, which means that you can apply tree-shaking in you project


A vue component of popper.js, and the arrow position control is implemented





Run Example

Your can see the usage by run the example of the module, here is the step:

  1. Clone the library git clone https://github.com/livelybone/vue-popper.git
  2. Go to the directory cd your-module-directory
  3. Install npm dependencies npm i(use taobao registry: npm i --registry=http://registry.npm.taobao.org)
  4. Open service npm run dev
  5. See the example(usually is in your browser


npm i -S @livelybone/vue-popper

Global name - The variable the module exported in umd bundle



See what method or params you can use in index.d.ts


import VuePopper from '@livelybone/vue-popper'
import '@livelybone/vue-popper/lib/css/index.css';

// Global register
Vue.component('VuePopper', VuePopper)

// Local register
new Vue({


Name Type DefaultValue Description
arrowPosition String middle Set the position of arrow, options: middle start end
arrowOffsetScaling Number window.devicePixelRatio or 1 Set the left offset scaling of arrow
referenceElm HTMLElement the parentNode of the component instance Prop reference of popper.js
popperOptions Object Defaults of popper.js Prop options of popper.js


Since 2.3.0, you don't need to import the css file in your project, because the style will be injected inline

For rewrite style, you can copy the index.scss or index.css file, rewrite it, and the import the file in your project


  1. Error Error: spawn node-sass ENOENT

You may need install node-sass globally, npm i -g node-sass

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.