Skip to content

Latest commit

 

History

History

vue-use-tippy

@3yourmind/vue-use-tippy

Vue hook for tippy.js

Usage

import { useTippy } from '@3yourmind/vue-use-tippy'
import { computed, defineComponent, ref } from 'vue'

export default defineComponent({
	setup() {
		const contentRef = ref<Element | null>(null)

		useTippy(
			helpTextTriggerRef,
			computed(() => ({
				appendTo: () => document.body,
				content: contentRef.value ?? undefined,
				interactive: true,
				theme: 'light-border',
			})),
		)

		return {
			contentRef,
		}
	},
})

Options

See https://atomiks.github.io/tippyjs/v6/all-props/ for supported options