UNPKG

round-carousel-component

Version:

An infinitely scrollable 3D carousel component for the web

35 lines (34 loc) 966 B
export type RoundCarouselItem = { readonly alt?: string; readonly image: string; readonly content: HTMLElement; }; export type RoundCarouselOptions = { readonly items: RoundCarouselItem[]; readonly itemWidth?: number; readonly nextButtonContent?: string | HTMLElement; readonly prevButtonContent?: string | HTMLElement; readonly showControls?: boolean; }; export declare class RoundCarousel { private element; private touchsweep; private options; private defaultOptions; selectedIndex: number; constructor(element: HTMLElement, options: RoundCarouselOptions); init: () => void; destroy: () => void; setSelectedIndex: (index: number) => void; prev: () => void; next: () => void; private getValues; private getSlideStyle; private setStyle; private bind; private unbind; private build; private buildItems; private buildControls; } export default RoundCarousel;