UNPKG

react-multi-carousel

Version:

Production-ready, lightweight fully customizable React carousel component that rocks supports multiple items and SSR(Server-side rendering) with typescript.

62 lines (61 loc) 2.41 kB
import * as React from "react"; import { CarouselInternalState, CarouselProps, stateCallBack } from "./types"; declare class Carousel extends React.Component<CarouselProps, CarouselInternalState> { static defaultProps: { slidesToSlide: number; infinite: boolean; draggable: boolean; swipeable: boolean; arrows: boolean; containerClass: string; sliderClass: string; itemClass: string; keyBoardControl: boolean; autoPlaySpeed: number; showDots: boolean; minimumTouchDrag: number; dotListClass: string; focusOnSelect: boolean; centerMode: boolean; additionalTransfrom: number; }; private readonly containerRef; onMove: boolean; initialX: number; lastX: number; isAnimationAllowed: boolean; direction: string; autoPlay?: any; isInThrottle?: boolean; initialY: number; constructor(props: CarouselProps); setIsInThrottle(isInThrottle?: boolean): void; componentDidMount(): void; setClones(slidesToShow: number, itemWidth?: number, forResizing?: boolean): void; setItemsToShow(shouldCorrectItemPosition?: boolean): void; setContainerAndItemWidth(slidesToShow: number, shouldCorrectItemPosition?: boolean): void; correctItemsPosition(itemWidth: number, isAnimationAllowed?: boolean): void; onResize(value?: React.KeyboardEvent | boolean): void; componentDidUpdate({ keyBoardControl, autoPlay }: CarouselProps, { containerWidth, domLoaded }: CarouselInternalState): void; correctClonesPosition({ domLoaded, }: { domLoaded?: boolean; }): void; next(slidesHavePassed?: number): void; previous(slidesHavePassed?: number): void; componentWillUnmount(): void; resetMoveStatus(): void; handleDown(e: React.MouseEvent | React.TouchEvent): void; handleMove(e: React.MouseEvent | React.TouchEvent): void; handleOut(e: React.MouseEvent | React.TouchEvent): void; onKeyUp(e: React.KeyboardEvent): void; handleEnter(): void; goToSlide(slide: number): void; getState(): stateCallBack; renderLeftArrow(): React.ReactNode; renderRightArrow(): React.ReactNode; renderButtonGroups(): React.ReactElement<any> | null; renderDotsList(): React.ReactElement<any> | null; renderCarouselItems(): any; render(): React.ReactNode; } export default Carousel;