React Tooltip - Resize and Relocate

To change the size of the Tooltip, specify the height and width properties. Note that the Tooltip's arrow takes its share of the overall size.

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

If you need to position the Tooltip against a certain side of the target element, set the position property.

  • <template>
  • <div>
  • <img id="image" src="https://url/to/an/image" />
  • <DxTooltip
  • target="#image"
  • show-event="dxhoverstart"
  • hide-event="dxhoverend"
  • position="top"> <!-- or "bottom" | "left" | "right" -->
  • <template #content>
  • <p>Tooltip content</p>
  • </template>
  • </DxTooltip>
  • </div>
  • </template>
  •  
  • <script>
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import { DxTooltip } from 'devextreme-vue/tooltip';
  •  
  • export default {
  • components: {
  • DxTooltip
  • }
  • }
  • </script>
See Also