A flexible and accessible Vue 3 tooltip component and directive with TypeScript support. Built with zero dependencies (except Vue 3), featuring automatic positioning, keyboard navigation, and full accessibility support.
- 🎯 Component & Directive: Use as a component or a directive (v-tooltip)
- ♿ Accessible: Full keyboard navigation and screen reader support
- 🎨 Customizable: Flexible positioning, styling, and content
- 📱 Smart Positioning: Auto-detects best position based on available space
- ⚡ Lightweight: Zero dependencies except Vue 3
- 📦 TypeScript: Full TypeScript support with type definitions
- 🎭 Multiple Triggers: Hover, focus, click, or combination
- ⏱️ Configurable Delays: Custom show/hide delays
- 🎮 Programmatic Control: Show, hide, and toggle tooltips programmatically
- 🌙 Theme Support: Built-in dark mode and theme presets
# npm
npm install @borstihd/vue-custom-tooltip
# pnpm
pnpm add @borstihd/vue-custom-tooltip
# yarn
yarn add @borstihd/vue-custom-tooltip// main.ts
import { VueCustomTooltip } from '@borstihd/vue-custom-tooltip'
import { createApp } from 'vue'
import App from './App.vue'
import '@borstihd/vue-custom-tooltip/dist/style.css'
const app = createApp(App)
app.use(VueCustomTooltip)
app.mount('#app')<template>
<Tooltip content="Simple tooltip text">
<button>Hover me</button>
</Tooltip>
</template><template>
<button v-tooltip="'Simple tooltip text'">
Hover me
</button>
<!-- With modifiers -->
<button v-tooltip.top.click="'Click to see tooltip'">
Click me
</button>
</template>For comprehensive guides, examples, and API reference, visit the full documentation.
- Getting Started - Installation and setup
- Component Usage - Detailed component API
- Directive Usage - Directive modifiers and options
- Global Configuration - Set defaults for all tooltips
- Themes - Built-in themes and customization
- Examples - Interactive examples and demos
- Modern browsers (Chrome, Firefox, Safari, Edge)
- Vue 3.x
MIT License - see LICENSE file for details
Contributions are welcome! Please feel free to submit a Pull Request.