Vue Tooltip - Overview

The Tooltip UI component displays a tooltip for a specified element on the page.

View Demo

The following code creates a simple Tooltip on your page and attaches it to another element (in this example, to an image).

Code
  • <template>
  • <div>
  • <img id="image" src="https://url/to/an/image" />
  • <DxTooltip
  • target="#image"
  • show-event="dxhoverstart"
  • hide-event="dxhoverend">
  • <template #content>
  • <p>Tooltip content</p>
  • </template>
  • </DxTooltip>
  • </div>
  • </template>
  •  
  • <script>
  • import 'devextreme/dist/css/dx.fluent.blue.light.css';
  •  
  • import { DxTooltip } from 'devextreme-vue/tooltip';
  •  
  • export default {
  • components: {
  • DxTooltip
  • }
  • }
  • </script>
NOTE

The component may affect the page layout when used inside a flex container with other elements. For example, the following parent CSS styles can cause this issue:

CSS
  • .flex {
  • display: flex;
  • justify-content: space-between;
  • }

To avoid changes to the page layout, implement the following CSS styles for the Tooltip container:

CSS
  • .dx-tooltip {
  • display: none !important;
  • }
See Also