DEV Community

loading...

Discussion on: Smarter Tooltips and Popovers with Popper 2

Collapse
fezvrasta profile image
Federico Zivolo Author

Take a look at the offset modifier, it can apply negative offsets to make the popper overlap with its reference element

Collapse
panphora profile image
David Miranda • Edited

So, the best way to get a popover to appear directly above an element would be to use the offset option as a function, as seen in the docs and use the reference element's dimensions to calculate the offset?

Thread Thread
fezvrasta profile image
Federico Zivolo Author

Yes, you'd do something like this:
codesandbox.io/s/epic-silence-i7680

Thread Thread
panphora profile image
David Miranda

Great, thank you!