Popover Plugin for Vue 3
A popover plugin for Vue.js.
Vue.js 3.2+ required.
Install Plugin
NPM
npm install v-popover
Use Plugin
:warning: As of v3.0.0-alpha.7
, all installation methods require manual import of component styles. This is due to Vite build restrictions in libary mode.
import 'v-popover/style.css';
Method 1: Use Globally
import VPopover from 'v-popover';
import 'v-popover/style.css';
app.use(VPopover, {})
<template>
<VPopover />
</template>
Method 2: Use Components Globally
import { Popover } from 'v-popover';
import 'v-popover/style.css';
app.component('VPopover', Popover)
<template>
<VPopover />
</template>
Method 3: Use Components As Needed
<!-- MyComponent.vue -->
<template>
<Popover />
</template>
<script>
import { Popover } from 'v-popover';
import 'v-popover/style.css';
export default {
components: {
Popover,
}
}
</script>
Source setup
Please follow below mentioned steps to clone and build this project:
Clone the repo
git clone https://github.com/nathanreyes/v-popover
cd v-popover
Install dependencies
npm install
Build library
npm run build
Lint and fix files
npm run lint
Test library
npm run test