Websites v4 docs v8.3.1
    Preparing search index...

    Interface UseScrollToOptions

    interface UseScrollToOptions {
        correctionWindow?: number;
        onComplete?: () => void;
        yOffset?: number | (() => number);
    }
    Index

    Properties

    correctionWindow?: number

    How long (ms) to keep correcting the scroll position while the page is still shifting layout (e.g. lazy-loaded content above the target resolving). Defaults to 3000.

    onComplete?: () => void

    Called once the correction window elapses.

    yOffset?: number | (() => number)

    A fixed offset in px, or a function returning one (e.g. to clear a sticky header), subtracted from the target's position.