Position of the tooltip. Valid values are the same as placement values in FloatingUI
autoPlacementfalse
Boolean
Calculates best placement for tooltip based on available space.
fliptrue
Boolean
Changes the placement of the tooltip in order to keep it in view
delay50
Number
Delay before showing and hiding tooltip
offsetX0
Number
Offset of tooltip element relative to bound element.
offsetY0
Number
Offset of tooltip element relative to bound element.
transitionfade
String
Use animation when showing or hiding tooltip. Valid values are: 'fade', 'scale-fade' or empty string
textundefined
StringFunction
Defines text to display inside tooltip. If text is undefined then data-title attribute of reference element is used as content for tooltip
Usage
To show tooltip when hovering over html element use the v-tooltip directive. There are three possible ways to set directive value: string, function or object :
<template><divclass="flex flex-col md:flex-row gap-y-4 md:gap-x-4"><v-buttonv-tooltip="{
offsetY: 5,
placement: 'top',
text: 'This is tooltip on the top',
}"
>
Hover me (tooltip on top)
</v-button><v-buttonv-tooltip="{
offsetY: 5,
placement: 'right',
text: 'This is tooltip on the right',
}"
>
Hover me (tooltip on right)
</v-button><v-buttonv-tooltip="{
offsetY: 5,
autoPlacement: true,
flip: false,
text: 'This is auto placed tooltip',
}"
>
Hover me (automatic placement)
</v-button></div></template>