UNPKG

js.foresight

Version:

Predicts mouse trajectory to trigger actions as users approach elements, enabling anticipatory UI updates or pre-loading. Made with vanilla javascript and usable in every framework.

6 lines 277 B
import type { Point, ScrollDirection } from "../../types/types"; export declare function predictNextScrollPosition(currentPoint: Point, direction: ScrollDirection, scrollMargin: number): { x: number; y: number; }; //# sourceMappingURL=predictNextScrollPosition.d.ts.map