Replies: 2 comments
-
You can use virtual elements https://floating-ui.com/docs/virtual-elements |
Beta Was this translation helpful? Give feedback.
0 replies
-
So. is the virtual element's dimensions/coordinates supposed to be my reference elements? Or meant to be a 0-width, 0-height ele that "follows" the mouse's movements? How do I ensure it stays in the boundaries of my reference ele? Clamp the coordinates myself as they approach the edges? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! Lovely lib!
I've searched google and this repo's issues and discussions for "follow mouse" to try to find something that might help me here, and I feel like I'm missing something, or misinterpreting the docs.
I know how to build a traditional tooltip (triggered by a hover anywhere within a reference ele's boundaries), and how to build a floating element that follows the mouse throughout the viewport, but not how to combine the two per this discussion's title: something where a tooltip appears upon hovering at any point within the reference ele's boundaries, which will follow the mouse's movements until it hits said boundaries, after which the tooltip disappears.
Any pointers?
Beta Was this translation helpful? Give feedback.
All reactions