Skip to content

Use props (for example: triggerTarget) in vue-tippy component #236

Answered by KABBOUCHI
Suniver asked this question in Q&A
Discussion options

You must be logged in to vote

yes, its possible https://stackblitz.com/edit/vitejs-vite-vlt65w?file=src%2FApp.vue&terminal=dev

<script setup>
import { ref } from 'vue';

const triggerTarget = ref();
</script>


<template>
  <button ref="triggerTarget">Trigger target</button>

  <br />

  <tippy :triggerTarget="triggerTarget">
    <template #default> Positioning target </template>
    <template #content> I'm a Tippy tooltip! </template>
  </tippy>
</template>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by KABBOUCHI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants