Vue UI Components Documentation
The Vue Tooltip enables users to display a popup message. This guide adds the Vue Tooltip (jqxTooltip) to an app, then shows how to set its options, handle its events and call its methods.
jqwidgets-scriptsjqwidgets-scripts/jqwidgets-vue3/vue_jqxtooltip.vue 
In a Vue 3 project (to start one, see Getting started with Vue), add the package:
npm install jqwidgets-scripts
import JqxTooltip from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtooltip.vue';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.tailwind-blue-dark.css';
With <script setup>, an imported component is ready to use in the template. jqx.base.css is required; the second file is a theme, selected with the theme attribute.
The Default Functionality demo as a Single-File Component:
<template>
<div id="container">
<JqxTooltip
:position="'mouse'"
:name="'movieTooltip'"
:content="'<b>Title:</b> <i>The Amazing Spider-man</i><br /><b>Year:</b> 2012'"
>
<img src="https://www.jqwidgets.com/vue/images/The_Amazng_Spider_Man.jpeg" />
</JqxTooltip>
<JqxTooltip
:position="'mouse'"
:name="'movieTooltip'"
:content="'<b>Title:</b> <i>The Avengers</i><br /><b>Year:</b> 2012'"
>
<img src="https://www.jqwidgets.com/vue/images/The_Avengers.jpg" />
</JqxTooltip>
<JqxTooltip
:position="'mouse'"
:name="'movieTooltip'"
:content="'<b>Title:</b> <i>The Dark Knight Rises</i> <br /><b>Year:</b> 2012'"
>
<img src="https://www.jqwidgets.com/vue/images/The_Dark_Knight_Rises.jpg" />
</JqxTooltip>
<JqxTooltip
:position="'mouse'"
:name="'movieTooltip'"
:content="'<b>Title:</b> <i>Harry Potter and the Deathly Hallows - Part 1</i><br /><b>Year:</b> 2010'"
>
<img src="https://www.jqwidgets.com/vue/images/Harry_Potter_7_Part_1.jpg" />
</JqxTooltip>
<JqxTooltip
:position="'mouse'"
:name="'movieTooltip'"
:content="'<b>Title:</b> <i>Harry Potter and the Deathly Hallows - Part 2</i><br /><b>Year:</b> 2011'"
>
<img src="https://www.jqwidgets.com/vue/images/Harry_Potter_7_Part_2.jpg" />
</JqxTooltip>
<JqxTooltip
:position="'mouse'"
:name="'movieTooltip'"
:content="'<b>Title:</b> <i>Inception</i><br /><b>Year:</b> 2010'"
>
<img src="https://www.jqwidgets.com/vue/images/Inception.jpg" />
</JqxTooltip>
<JqxTooltip
:position="'mouse'"
:name="'movieTooltip'"
:content="'<b>Title:</b> <i>Star Trek</i><br /><b>Year:</b> 2009 '"
>
<img src="https://www.jqwidgets.com/vue/images/Star_Trek.jpg" />
</JqxTooltip>
<JqxTooltip
:position="'mouse'"
:name="'movieTooltip'"
:content="'<b>Title:</b> <i>Star Wars</i> Episode III: <i>Revenge of the Sith</i><br /><b>Year:</b> 2005'"
>
<img src="https://www.jqwidgets.com/vue/images/Star_Wars_Episode_III.jpg" />
</JqxTooltip>
<JqxTooltip
:position="'mouse'"
:name="'movieTooltip'"
:content="'<b>Title:</b> <i>Thor</i><br /><b>Year:</b> 2011'"
>
<img src="https://www.jqwidgets.com/vue/images/Thor.jpg" />
</JqxTooltip>
</div>
</template>
<script setup>
import JqxTooltip from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtooltip.vue';
</script>
<style>
#container {
width: 400px;
}
#container div {
margin: 8px 8px 0 8px;
float: left;
height: 162px;
}
</style>Options are attributes. Bind values from the script with :, for example :width="850".
Listen to an event with @ and its name. For example, open: This event is triggered when the tooltip is opened (shown).
<script setup>
function onOpen(event) {
console.log(event.args);
}
</script>
<template>
<JqxTooltip @open="onOpen" />
</template>
Call methods through a template ref. For example, open: Opens the tooltip.
<script setup>
import { ref, onMounted } from 'vue';
const myTooltip = ref(null);
onMounted(() => {
myTooltip.value.open();
});
</script>
<template>
<JqxTooltip ref="myTooltip" />
</template>
Every component also has setOptions({ … }) and getOptions('name').