Skip to content

borsTiHD/vue-custom-tooltip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vue Custom Tooltip

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.

Features

  • 🎯 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

Installation

# npm
npm install @borstihd/vue-custom-tooltip

# pnpm
pnpm add @borstihd/vue-custom-tooltip

# yarn
yarn add @borstihd/vue-custom-tooltip

Quick Start

// 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')

Component Usage

<template>
  <Tooltip content="Simple tooltip text">
    <button>Hover me</button>
  </Tooltip>
</template>

Directive Usage

<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>

Documentation

For comprehensive guides, examples, and API reference, visit the full documentation.

Key Topics

Browser Support

  • Modern browsers (Chrome, Firefox, Safari, Edge)
  • Vue 3.x

License

MIT License - see LICENSE file for details

Author

borsTiHD

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

Vue 3 Tooltip System - Component Wrapper and Directive Implementation

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •