svelte-scrollto-element
Version:
Svelte action that listens for click events and scrolls to elements with animation. Inspired by rigor789/vue-scrollto.
11 lines (10 loc) • 774 B
TypeScript
import { ScrollToElementOptions, ScrollToElementPosition } from './../global.interface';
export declare const $: (selector: HTMLElement | string) => HTMLElement;
export declare const extend: (...args: ScrollToElementOptions[]) => ScrollToElementOptions;
export declare const cumulativeOffset: (element: HTMLElement | any) => ScrollToElementPosition;
export declare const directScroll: (element: HTMLElement | any) => boolean;
export declare const scrollTop: (el: HTMLElement | string, value?: number) => number;
export declare const scrollLeft: (el: HTMLElement | string, value?: number) => number;
export declare const noop: () => void;
export declare const startAnimationLoop: (callback: (time: number) => boolean) => (() => void);
export declare const now: () => number;