vue-popper-component

Vue.js component for Popper.js
3,122 44
Install
npm install vue-popper-component
Latest Version:0.1.0
Vue:1
License:MIT
Last Updated:Mar 27, 2017
Links: GitHub  ·  npm
Maintainer: antongorodezkiy

vue-popper-component

Simple Vue.js component for Popper.js plugin.

Demos:

https://antongorodezkiy.github.io/vue-popper-component/

Dependencies:

  • Vue 1.*
  • Popper.js 1.*

Usage:

const
	Vue = require('vue'),
  VuePopper = require('vue-popper-component');
	
new Vue({
  el: '#app',
  
  components: {
    'popper': VuePopper
  },
  
  data: {
    showPopperParentVar: true
  }
});
<popper
	:show-popper.sync="showPopperParentVar"
	content="Some plain text message here"
	placement="right"
	close-button="Close me!">
    
    <span @click.prevent="showPopperParentVar = !showPopperParentVar">
      ?
    </span>
    
</popper>

Usage with html in slots:

<popper
  :show-popper.sync="showPopperParentVar"
  content="Lorem ipsum dolor"
  placement="top"
  close-button="1">
  
    <div slot="close-button">
      <i class="glyphicon glyphicon-remove"></i>
    </div>
    
    <div slot="content">
      <h2><i class="glyphicon glyphicon-star"></i> <b>us</b> <i>on</i> <u>github</u>!</h2>
      <a @click.prevent="showPopperParentVar = false" href="#">Close this popover from the content!</a>
    </div>
  
    <button class="btn btn-default" @click.prevent="showPopperParentVar = !showPopperParentVar">
      Click to open popover on the bottom
    </button>
</popper>

Related Packages

@soldeplata/popper-vue

Popperjs implemented in a vue single file component

6,214 10
vue

The progressive JavaScript framework for building modern web UI.

588,019,132 54,801
vue
@vueuse/shared
372,738,348 22,398
@vueuse/core

Collection of essential Vue Composition Utilities

367,188,523 22,398

Version History

Version Released Vue License
0.1.0 1.* MIT
0.0.4 1.* MIT
0.0.3 ^1.0.25 MIT
0.0.2 ^1.0.25 MIT
0.0.1 ^1.0.25 MIT