Popper for Vue
Simple, powerful, configurable. Popper v2.x!!
Positions a popup element close to the reference object.
It will always position itself automagically into a visible position. Supports adding an "arrow" element.
Install
yarn
npm
Usage
VueJS single file component
Props
Prop | Required | Type | Default | Description |
---|---|---|---|---|
show OR v-model | no | Boolean |
false | Toggles the popper element with a v-show directive (animations must take this into account) |
arrow | no | Boolean |
false | Adds an arrow to the popped component (default background is transparent) |
arrowClass | no | Object, Array, String |
undefined | It's bound to :class of the arrow wrapper. Useful to set background color |
options | no | Object |
undefined | Sets the options to the popper instance. See popper documentation |
popperClass | no | Object, Array, String |
undefined | It's bound to :class of the popper wrapper |
Events
Event | Payload | Description |
---|---|---|
@popper | Instance from '@popperjs/core' | Emitted on mount. Popper native methods can be used. See popper documentation |
Slots
name | Description |
---|---|
default | Reference element over which the popup will be positioned |
popper | Popper element that will be positioned around the Reference |