@blossom-carousel/svelte
Version:
A native-scroll-first carousel component for Svelte.
14 lines (13 loc) • 659 B
TypeScript
import type { Direction } from "./types.js";
/**
* Mirrors `::scroll-button():disabled`: a direction is scrollable only when the
* scroller hasn't reached the corresponding edge. `scrollLeft` is normalized via
* `Math.abs` so this also holds in RTL where it is negative.
*/
export declare function canScroll(scroller: HTMLElement, dir: Direction): boolean;
/**
* Mirrors `::scroll-button()` activation: advance to the next/previous snap
* point when scroll-snap is in use (brought into view with its own inline
* alignment), otherwise page by ~85% of the scrollport.
*/
export declare function pageScroll(scroller: HTMLElement, dir: Direction): void;