Home
Softono

Vue Tippy

Open source MIT TypeScript
788
Stars
96
Forks
35
Issues
8
Watchers
7 months
Last Commit

 About Vue Tippy

VueJS Tooltip powered by Tippy.js

Platforms

Web Self-hosted

Languages

TypeScript

Need Help Installing Vue Tippy?

We provide expert installation service for this software. Our team will install, configure, and secure Vue Tippy on your server. plans start at just $30.

VueTippy - V6

npm vue2 download

Vue.js 3 wrapper for Tippy.js

Documentation

For full v6 documentation, visit https://vue-tippy.netlify.app/.

Installation

npm install vue-tippy@v6

//or

yarn add vue-tippy@v6

Configuration (optional)

import { createApp } from 'vue'

import VueTippy from 'vue-tippy'
// or
import { plugin as VueTippy } from 'vue-tippy'

const app = createApp({})

app.use(
  VueTippy,
  // optional
  {
    directive: 'tippy', // => v-tippy
    component: 'tippy', // => <tippy/>
  }
)

app.mount('#app')

Usage

Vue Directive

<template>
  <button v-tippy="{ content: 'Hi!' }">Tippy!</button>
  <button v-tippy="'Hello!'">Tippy!</button>
</template>

<script setup>
import { directive as VTippy } from 'vue-tippy'
</script>

Vue Component

<template>
  <Tippy content="Hi!">
    <button>Tippy!</button>
  </Tippy>
</template>

<script setup>
import { Tippy } from 'vue-tippy'
</script>

Using composition api

import { defineComponent, ref, h } from 'vue'
import { useTippy } from 'vue-tippy'

export default defineComponent({
  setup() {
    const button = ref()

    useTippy(button, {
      content: 'Hi!',
    })

    return () => h('button', { ref: button }, 'Tippy!')
  },
})