Set horizontal offset position for tooltip #966
|
Is there a way to offset the tooltip to the right or left? |
Answered by
gabrieljablonski
Mar 2, 2023
Replies: 1 comment 1 reply
|
You can set the <Tooltip
id="my-tooltip"
middlewares={[
// change `crossAxis`
offset({ mainAxis: 10, crossAxis: 50 }),
flip(),
shift({ padding: 5 }),
]}
/>The other middlewares are there to keep the other tooltip positioning rules the same, since passing a value to Check the |
1 reply
Answer selected by
gabrieljablonski
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can set the
floating-uimiddlewares manually to achieve this.The main thing is using the
offset()middleware with thecrossAxisoptions.Here's an example.
The other middlewares are there to keep the other tooltip positioning rules the same, since passing a value to
middlewaresoverrides the defaults.Check the
floating-uidocs for more info.