Getting started
floating-vue is a library helping you add tooltips, dropdowns and other poppers into your Vue application.
Sponsors
Thank you to my sponsors allowing me to spend more time on Open Source projects! 🙏️
Quick start
- Install the package:
bash
npm i floating-vuebash
yarn add floating-vuebash
pnpm add floating-vue- Add the plugin into your app:
js
import FloatingVue from 'floating-vue'
app.use(FloatingVue)- Add the default style:
js
import 'floating-vue/dist/style.css'- Use the
v-tooltipdirective:
html
<button v-tooltip="'You have ' + count + ' new messages.'">Learn more about the directive
- Use the
VDropdownorVMenucomponent:
html
<VDropdown>
<!-- This will be the popover target (for the events and position) -->
<button>Click me</button>
<!-- This will be the content of the popover -->
<template #popper>
<MyAwesomeComponent/>
</template>
</VDropdown>
Floating Vue