Skip to content

Interface: UseTooltipResult ​

Returned by useTooltip().

Properties ​

PropertyModifierTypeDescription
statereadonlyReadonly<ShallowRef<TooltipState>>The controller state as a shallow ref; updated on the client while the scope is alive.

Methods ​

getTooltipProps() ​

ts
getTooltipProps(id): VueProps;

Props for the tooltip of id: id, role="tooltip", aria-hidden, data-state (open/closed).

Parameters ​

ParameterType
idstring

Returns ​

VueProps


getTriggerProps() ​

ts
getTriggerProps(id, options?): VueProps;

Props for a trigger: shows its tooltip on hover (not touch) and focus after the delay, hides on pointer leave, blur and mousedown. Adds aria-describedby only with describe.

Parameters ​

ParameterType
idstring
options?TooltipTriggerOptions

Returns ​

VueProps


hide() ​

ts
hide(): void;

Hide the visible tooltip at once.

Returns ​

void


show() ​

ts
show(id): void;

Show the tooltip for id at once, without the delay.

Parameters ​

ParameterType
idstring

Returns ​

void