UNPKG

@drozdik.m/slow-scroll

Version:
37 lines (36 loc) 985 B
export declare class SlowScroll { private static offset; /** * Constructor that sets events for .slowScroll */ constructor(); /** * Sets new offset for scrolling * @param newOffset New offset value */ SetOffset(newOffset: number): void; /** * Initializes anchor slow scroll * @param className Target links class (default = "slowScroll") */ static AnchorScroll(className?: string): void; /** * Scrolls to position from tom * @param top Target scroll px from top */ static ToPx(top: number): void; /** * Scrolls to an element * @param element Target element */ static To(element: HTMLElement): void; /** * Scrolls to the first element matching the selector )if there is any) * @param selector Target selector */ static ToFirst(selector: string): void; /** * Scrolls to top */ static ToTop(): void; }