2.0.0 • Published 8 months ago

@3yourmind/vue-use-tippy v2.0.0

Weekly downloads
55
License
MIT
Repository
github
Last release
8 months ago

@3yourmind/vue-use-tippy

Vue hook for tippy.js

Usage

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

export default defineComponent({
	setup() {
		const contentRef = ref(null)

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

		return {
			contentRef,
		}
	},
})

Right now, @vue/composition-api@0.6.1 is recommended.

Options

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