Returns a bounding rect of an anchor relative to a window around which a target is positioned.
Optional
getReturns a bounding rect of a container that constrains a target positioning.
By default, window visual viewport is used as a container.
Returns a bounding rect of an element that is positioned around an anchor.
Optional
isIf true
then anchored position of a target element isn't tracked.
Optional
isRTLIf true
then horizontal alignment is mirrored.
By default, RTL is derived a document.
A handler that is called when the target element must be repositioned.
An info about the current target position around an anchor. The info object is reused between handler invocations.
Optional
variantsAn array of target position variants from which the most suitable is picked.
By default, a single variant is used with default settings.
Props of the useAnchorPosition hook.