React Hookers - v6.3.0
    Preparing search index...

    Interface AnchorPositionProps

    Props for the useAnchorPosition hook.

    interface AnchorPositionProps {
        getAnchorRect: () => DOMRect | undefined;
        getContainerRect?: () => DOMRect | undefined;
        getTargetRect: () => DOMRect | undefined;
        isDisabled?: boolean;
        isRTL?: boolean;
        onPositionChange: (info: Readonly<AnchorPositionInfo>) => void;
        variants?: AnchorPositionVariant[];
    }
    Index

    Properties

    getAnchorRect: () => DOMRect | undefined

    Returns a bounding rect of an anchor (relative to the window) around which a target is positioned.

    getContainerRect?: () => DOMRect | undefined

    Returns a bounding rect of a container that constrains target positioning.

    By default, the visual viewport is used as a container.

    getTargetRect: () => DOMRect | undefined

    Returns a bounding rect of the element positioned around an anchor.

    isDisabled?: boolean

    If true, anchored positioning isn't tracked.

    false
    
    isRTL?: boolean

    If true, horizontal alignment is mirrored.

    By default, RTL is derived from the document.

    onPositionChange: (info: Readonly<AnchorPositionInfo>) => void

    Called when the target element must be repositioned.

    Type Declaration

    An array of target position variants from which the most suitable is picked.

    By default, a single variant is used with default settings.