Vue Tippy is an official Vue.js 3 wrapper for Tippy.js, a lightweight and highly customizable JavaScript tooltip library. It facilitates the integration of dynamic and accessible tooltips, popovers, and dropdowns into Vue 3 applications, offering comprehensive control over placement, triggers, content rendering, and styling. The package is currently at version 6.7.1, which is designed for compatibility with Vue 3.x and Tippy.js v6. The project's release cadence is closely tied to major updates in either Vue or Tippy.js, ensuring ongoing alignment with the latest features and API changes of its core dependencies. Key differentiators include its flexible integration patterns: developers can choose between a global Vue plugin that registers both a `v-tippy` directive and a `<Tippy>` component, direct local imports of the directive or component for fine-grained control, or leverage the `useTippy` Composition API hook for programmatic tooltip management within setup functions. This adaptability allows developers to pick the integration method best suited for their specific project architecture and component design, while benefiting from full TypeScript support.
npm install vue-tippyVerified import paths — ran on the pinned version, not inferred.
Initializes a Vue 3 application, globally registers the VueTippy plugin, and demonstrates basic usage of both the `v-tippy` directive and the `<Tippy>` component. Includes essential CSS import.
For Vue 2 projects, use `vue-tippy@v4`. For Vue 3, ensure your Vue version is 3.2.0 or higher. For new projects, install `vue-tippy@v6` explicitly via `npm install vue-tippy@v6` or `yarn add vue-tippy@v6`.
Always include `import 'tippy.js/dist/tippy.css'` in your main application entry file (e.g., `main.ts` or `main.js`). If using specific themes (e.g., `light`, `material`), import their respective CSS files like `import 'tippy.js/themes/light.css'`.
Always use `import` statements for `vue-tippy` and its exports. If you encounter issues in a Node.js environment, ensure your project is configured for ESM (e.g., `"type": "module"` in `package.json`) or use a bundler like Vite/Webpack that correctly handles ESM.
Ensure you either globally register the plugin via `app.use(VueTippy)` in your `main.ts`/`main.js`, or locally import and register the component in your Vue component's `<script setup>` or `components` option: `import { Tippy } from 'vue-tippy'; components: { Tippy }`.Ensure you either globally register the plugin via `app.use(VueTippy)` in your `main.ts`/`main.js`, or locally import and register the directive in your Vue component's `<script setup>` or `directives` option: `import { directive as VTippy } from 'vue-tippy'; directives: { tippy: VTippy }`.Correct the import statement to use named import syntax: `import { useTippy } from 'vue-tippy'`.