@nydelic/toolbox
Version:
A collection of hooks, components, and other helpful tools.
23 lines • 950 B
TypeScript
export declare function checkIE(): boolean;
interface ScrollToArgs {
top?: number;
left?: number;
duration: {
/** time in miliseconds */
exact: number;
} | {
/** time relative to amount to scroll */
relative: number;
};
/** scroll container. defaults to document element */
element?: HTMLElement | Element;
easing?: "linear" | "easeInOutQuad";
/** a method that will get called once the scroll animation finishes */
callback?: (arg: "top" | "left") => void;
/** nonblocking will cause the animation to cancle, if the user interacts with the scroll */
nonblocking?: true;
}
/** scroll a dom element programatically by n distance in t time (exact time or a relative time to the distance) */
export declare function scrollTo({ top, left, duration, element: elementArg, easing, callback, nonblocking, }: ScrollToArgs): void;
export {};
//# sourceMappingURL=go-light.d.ts.map