Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kabbouchi/vue-tippy
VueJS Tooltip powered by Tippy.js
https://github.com/kabbouchi/vue-tippy
javascript tippy tippyjs tooltip vue vuejs
Last synced: 2 days ago
JSON representation
VueJS Tooltip powered by Tippy.js
- Host: GitHub
- URL: https://github.com/kabbouchi/vue-tippy
- Owner: KABBOUCHI
- License: mit
- Created: 2017-04-30T14:48:57.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-09-12T12:13:37.000Z (2 months ago)
- Last Synced: 2024-09-12T23:31:15.783Z (2 months ago)
- Topics: javascript, tippy, tippyjs, tooltip, vue, vuejs
- Language: TypeScript
- Homepage: https://vue-tippy.netlify.app
- Size: 8.03 MB
- Stars: 727
- Watchers: 10
- Forks: 89
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# VueTippy - V6
[![npm](https://img.shields.io/npm/v/vue-tippy/latest.svg)](https://www.npmjs.com/package/vue-tippy) [![vue2](https://img.shields.io/badge/vue-3.x-brightgreen.svg)](https://vuejs.org/) [![download](https://img.shields.io/npm/dt/vue-tippy.svg)](https://www.npmjs.com/package/vue-tippy)
> Vue.js 3 wrapper for Tippy.js
## Documentation
For full v6 documentation, visit [https://vue-tippy.netlify.app/](https://vue-tippy.netlify.app/).
## Installation
```js
npm install vue-tippy@v6//or
yarn add vue-tippy@v6
```## Configuration (optional)
```js
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', // =>
}
)app.mount('#app')
```## Usage
### Vue Directive
```html
Tippy!
Tippy!import { directive as VTippy } from 'vue-tippy'
```
### Vue Component
```html
Tippy!
import { Tippy } from 'vue-tippy'
```
### Using composition api
```js
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!')
},
})
```