react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

Skip tooltip animations when switching between tooltips

Open Haberkamp opened this issue 1 week ago โ€ข 0 comments

Provide a general summary of the feature here

I've added an enter and exit animations to my tooltips. When I hover between two tooltips that are close to each other I get a weird look and feel. (I attached a video) Ideally I would just have an enter animation when I hover over the first tooltip and an exit animation when I leave the last tooltip.

https://github.com/user-attachments/assets/2795a654-d6d0-4170-82e2-b6c17dd558f0

๐Ÿค” Expected Behavior?

I am able to define exit and enter animations for tooltips. But switching from one to the other, in a short amount of time, happens instantly i.e. there's not animation during the transition.

๐Ÿ˜ฏ Current Behavior

I always get an enter and exit animation for every single tooltip. When I hover from A to B the following happens.

A: Exit animation starts B: Enter animation starts

๐Ÿ’ Possible Solution

I think a React Context would help. IIRC there's already a global store that "skips" the hover delay if a tooltip is already opened.

๐Ÿ”ฆ Context

I want to make this feel as smooth as possible. Other component libraries already support this: https://base-ui.com/react/components/tooltip#animating-the-tooltip.

(Note: I'm not talking about the fancy morphing, while that would be nice, I think it's more important that it's possible to skip the enter and exit animations when transitioning between tooltips)

๐Ÿ’ป Examples

No response

๐Ÿงข Your Company/Team

No response

๐Ÿ•ท Tracking Issue

No response

Haberkamp avatar Nov 28 '25 19:11 Haberkamp