vue-js-popover

Vue.js 2+ popover component
243,894 459
Install
npm install vue-js-popover
Latest Version:1.2.1
Vue:2
License:MIT
Last Updated:Jan 6, 2023
Links: GitHub  ·  npm
Maintainer: euvl

npm version

Vue.js popover

Live demo here

Install:

npm install vue-js-popover --save

Import:

import Vue from 'vue'
import Popover from 'vue-js-popover'

Vue.use(Popover)

Use:

<button v-popover:foo>Toggle popover</button>

<popover name="foo">
  Hello
</popover>

Or:

<button v-popover="{ name: 'foo' }">Toggle popover</button>

Tooltip

Plugin contains a simple wrapper for Tooltip. To use it you will have to:

Set tooltip flag in your main.js:

import VPopover from 'vue-js-popover'
Vue.use(VPopover, { tooltip: true })

Include tooltip component anywhere in the application:

<tooltip />

Assign message to any element:

<button v-popover:tooltip="'This is a string value'">My butt0n</button>

Props

Name Type Required Description
name String + ...
width Number - ...
transition String - ...
pointer Boolean - If set - will show a tiny tip
event "click" | "hover" - Type of event that will trigger showing of the popover
delay Number - Delay in milliseconds

Positioning

You can use .left, .right, .top, .bottom modifiers to set the position of the popover.

Example:

<button v-popover:info.right>Edit (show popover right)</button>

<button v-popover.left="{ name: 'info' }">Edit</button>

Styling

Popover components have data-popover="name" argument that allows to apply styles to it.

Example:

<popover name="foo" :pointer="false">Bar</popover>
[data-popover='foo'] {
  background: #444;
  color: #f9f9f9;

  font-size: 12px;
  line-height: 1.5;
  margin: 5px;
}

Related Packages

floating-ui

Easy Tooltips, dropdowns, menus & popovers using floating-ui

165,538
floating-vue

Easy Vue tooltips, dropdowns, menus & popovers using floating-ui

22,794,985 3,459
@novu/floating-vue

Easy Vue tooltips, dropdowns, menus & popovers using floating-ui

75,451 3,460
floating-vue2

Tooltips, dropdowns and popovers using floating-ui

1,672 0
@dolusoft/floating-vue

Dolusoft fork of floating-vue: Vue 3.5 compiler build + dispose() retainer fix....

1,089 0

Version History

Version Released License
1.2.1 MIT
1.2.0 MIT
1.1.8 MIT
1.1.7
1.1.6