Skip to content

Second trigger button inside the tooltip #219

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

You must be logged in to vote

vue-tippy v4:

<tippy ref="myTippy" interactive >
	<button @click="$refs && $refs.myTippy && $refs.tippy().hide()">
		Close Tippy (x)
	</button>
</tippy>

vue-tippy v6:

<tippy interactive :hideOnClick="false" >

  <template #default>
    <button>
    	Hi
    </button>
  </template>
  
  <template #content="{ hide }">
    <button @click="hide()" >
    	&times;
    </button>
  </template>
</tippy>
<tippy interactive :hideOnClick="false" trigger="manual">

  <template #default="{ show }">
    <button @click="show">
    	Hi
    </button>
  </template>
  
  <template #content="{ hide }">
    <button @click="hide()" >
    	&times;
    </button>
  </template>
</tippy>

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Figumari
Comment options

Answer selected by Figumari
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