@exadel/esl
Version:
Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components
27 lines (26 loc) • 1.33 kB
TypeScript
import type { ESLIncrementalScrollOptions } from './incremental-scroll-types';
/**
* ESLIncrementalScroll class provides static method to perform incremental scroll to a target element.
* It continuously recalculates the target position on each animation frame to handle dynamic content and animations.
*/
export declare class ESLIncrementalScroll {
/**
* Returns a copy of current default options for incremental scroll.
* @returns Current default options
*/
static get defaults(): ESLIncrementalScrollOptions;
/**
* Sets default options for incremental scroll.
* Only defined values from overrides will be applied.
* @param overrides - Partial options to override defaults
*/
static set defaults(overrides: ESLIncrementalScrollOptions);
/**
* Performs incremental scroll to bring an element into view with smooth animation.
* Continuously recalculates target position on each frame to handle dynamic content and animations.
* @param $el - Target element to scroll to, or null to scroll based on alignment strategy only
* @param options - Scroll configuration options
* @returns Promise that resolves when scroll completes or rejects if aborted
*/
static to($el: HTMLElement | null, options?: ESLIncrementalScrollOptions): Promise<void>;
}