react-spectrum
react-spectrum copied to clipboard
Skip tooltip animations when switching between tooltips
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