JSPM

@3yourmind/vue-use-tippy

3.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 14
  • Score
    100M100P100Q63703F
  • License MIT

Vue hook for tippy.js

Package Exports

  • @3yourmind/vue-use-tippy

Readme

@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