A reusable tooltip component for Vue (and VuePress) projects.
Vue-Custom-Tooltip is a customizable, reusable, and reactive tooltip component for Vue 2 & 3 projects. It can also be used with VuePress. This tooltip component allows users to easily add tooltips to their Vue applications and customize various options such as colors, background, border radius, and font weight.
Installation instructions depend on the version of Vue.js you are using. Here are the installation guides for both Vue 2.x and 3.x:
To install Vue-Custom-Tooltip with Vue 2.x, use the following steps:
npm install vue-custom-tooltip
or
yarn add vue-custom-tooltip
import Vue from 'vue';
import VueCustomTooltip from 'vue-custom-tooltip';
Vue.use(VueCustomTooltip);
To install Vue-Custom-Tooltip with Vue 3.x, use the following steps:
npm install vue-custom-tooltip@next
or
yarn add vue-custom-tooltip@next
import { createApp } from 'vue';
import VueCustomTooltip from 'vue-custom-tooltip';
const app = createApp(App);
app.use(VueCustomTooltip);
Alternatively, you can initialize the component directly within a single file in your project. However, note that this method does not allow for customizing the plugin options.
You can also load the tooltip component via a CDN by importing Vue first.
If you prefer a manual or local import, you can download the correct version of dist/vue-custom-tooltip.min.js based on your Vue version and include it in your project file after importing Vue.
For VuePress projects, a standalone plugin is available that wraps the tooltip component. You can install it through the .vuepress/config.js or .vuepress/theme/index.js file. Further instructions can be found in the vuepress-plugin-custom-tooltip repository.
Vue-Custom-Tooltip is a versatile tooltip component for Vue 2.x and 3.x projects. It offers customization options, reusability, and reactiveness. The installation process differs depending on the Vue version used, and there are multiple ways to initialize the component. Additionally, a VuePress plugin is available to integrate the component into VuePress projects.