useTooltipPosition
This hook is ideally used only within a modal and provides you with the ability to obtain coordinates to locate an element in relation to another element. Ideally for tooltips or popups.
Props
target
The element that will be used as a reference.
containerId
The element that you want to locate. By default, it will grab the modal-type=back.
containerOffsets
Generalized distance from the target element to the container.
zoneOutOffsets
When assigned a value, when the container mounts, it will generate a zone around it, and with this parameter, you can define the distance. Ideal for popups.