Set horizontal offset position for tooltip #966
-
|
Is there a way to offset the tooltip to the right or left? |
Beta Was this translation helpful? Give feedback.
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 |
Beta Was this translation helpful? Give feedback.
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.