Interface: UseTooltipResult
Returned by useTooltip().
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
state | readonly | Readonly<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
| Parameter | Type |
|---|---|
id | string |
Returns
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
| Parameter | Type |
|---|---|
id | string |
options? | TooltipTriggerOptions |
Returns
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
| Parameter | Type |
|---|---|
id | string |
Returns
void