Vue BaseTooltip is a library, built with Floating UI, that aims to provide a simple way to add good-looking, performant, and flexible tooltips to your application.
- 🫶 Uncomplicated: Easy to install and use.
 - 🎨 Customizable: Style according to your needs using plain CSS.
 - ☁️ CDN: No bundler required.
 - 🤸 Flexible: Use as plugin or directly import the component and directive.
 - 📦 Lightweight: The package only weighs ~2kb.
 - 🦾 Type Strong: Written in TypeScript.
 
Vue BaseTooltip can be installed using your favorite package manager or directly via CDN.
npm i -S vue-base-tooltipyarn add vue-base-tooltipVue BaseTooltip can be loaded via CDN using ESM or UMD format.
import VueBaseTooltip from 'https://unpkg.com/vue-base-tooltip/dist/vue-base-tooltip.es.js'<script src="https://unpkg.com/vue-base-tooltip/dist/vue-base-tooltip.umd.js"></script><link rel="stylsheet" href="https://unpkg.com/vue-base-tooltip/dist/style.css" />Import the plugin to your app and install it.
// main.ts/js
import VueBaseTooltip from 'vue-base-tooltip'
app.use(VueBaseTooltip)Add the default styling, this is optional in case you want to style your tooltip from scratch, as described in the styling section of the docs.
// main.ts/js
import VueBaseTooltip from 'vue-base-tooltip'
import 'vue-base-tooltip/style.css'
app.use(VueBaseTooltip)Use the v-tooltip directive to add a tooltip to an element.
<button v-tooltip="'This is a tooltip'">Button</button>For advanced usage, please check out the docs (I didn't want to make the readme too long).
Any feedback is gladly received, whether it's a code improvement or feature request, open an issue / connect with me on LinkedIn.
MIT License © 2022-present Carl Lidström Dreyer