Replies: 1 comment 12 replies
-
I don't believe placing something relative to the bottom of the pointer is a straight-forward design for browsers. Default cursor sizes may vary between different operating systems (though 32x32 seems like the norm), and the user may have a custom cursor as well, so the experience might be different across users. Also keeping track of the page zoom to adjust the offset is definitely doable, but a bit annoying. With that out of the way, assuming you still want to try keeping this design, while the tooltip does offer the Here's the example: https://codesandbox.io/p/sandbox/react-tooltip-overflow-forked-ptgn7n?file=%2Fsrc%2FApp.js%3A34%2C17 It will look broken on this page, since the application runs inside an iframe, but it should look correct if you open the "standalone" demo application here: On a further note, the tooltip by default flips from bottom to top (or top to bottom) when it would overflow the viewport. Here's how it looks: tooltip.mp4So that doesn't happen, we overwrite the default middlewares and omit At the end of the day, from a design/UX perspective I'd still recommend either keeping the tooltip with the default |
Beta Was this translation helpful? Give feedback.
-
Is there a way to place the tooltip bottom-start from the mouse pointer location? It looks like the tooltip attaches to the element and doesn't move, but our design requirements expect the tooltip to float below and to the right of the pointer.
I thought the imperative ref "api" might work but I don't see a way to set custom position logic "on open".
Beta Was this translation helpful? Give feedback.
All reactions