Skip to content

Tooltip

A tooltip that popup when the mouse hovers, focus, or click on a component.

Basic usage

When the mouse is moved in, the tooltip appears, and when the mouse is moved out, the tooltip disappears.

Custom Background Color

Customize the background color through the background-color property.

Position

The tooltip supports 12 different orientations. They are: upper left, upper, upper right, lower left, down, lower right, upper left, left, lower left, upper right, right, lower right.

Sizes

Besides default size, tu-tooltip component provides three additional sizes for you to choose among different scenarios. Use attribute size to set additional sizes with mini, small, large.

Tooltip API

Tooltip Attributes

NameDescriptionTypeDefault
v-modelWhether the tooltip is visibleBoolean-
default-popup-visibleWhether the tooltip is visible by default (uncontrolled mode)Booleanfalse
contentTooltip contentString-
positionPopup positionStringtop
sizePopup sizeStringmedium
background-colorBackground color of PopoverString-
content-classThe class name of the popup contentClassName-
content-styleThe style of the popup contentCSSProperties-
arrow-classThe class name of the popup arrowClassName-
arrow-styleThe style of the popup arrowCSSProperties-
popup-containerMount container for popupString HTMLElement null undefined-

Tooltip Events

NameDescriptionType
popup-visible-changeEmitted when the tooltip display status changesFunction

Tooltip Slots

NameDescriptionType
contentContent-