UNPKG

svelte-scrolling

Version:

Scroll to given elements with smooth animation

40 lines (39 loc) 1.32 kB
import type { Coord, GlobalOptions } from '../types/options'; /** * Scroll to a position on the page * * @param position - The position * @param options - An optional param with global options */ export declare const scrollPosition: (position: Coord | number, options?: Partial<GlobalOptions>) => Promise<void>; /** * Scroll to element * * @param reference - The element reference * @param options - An optional param with global options */ export declare const scrollElement: (reference: string, options?: Partial<GlobalOptions>) => Promise<void>; /** * Scroll to the top of the page * * @param options - An optional param with global options */ export declare const scrollTop: (options?: Partial<GlobalOptions>) => Promise<void>; /** * Scroll to the end of the page * * @param options - An optional param with global options */ export declare const scrollBottom: (options?: Partial<GlobalOptions>) => Promise<void>; /** * Scroll to the end of left the page * * @param options - An optional param with global options */ export declare const scrollLeft: (options?: Partial<GlobalOptions>) => Promise<void>; /** * Scroll to the end of right the page * * @param options - An optional param with global options */ export declare const scrollRight: (options?: Partial<GlobalOptions>) => Promise<void>;