runnel-react-carousel
Version:
A simple image carousel React component.
26 lines (25 loc) • 1.09 kB
TypeScript
export default function ImageCarousel({ images, height, width, className, imagesClassName, firstImageIndex, autoplay, imagesDuration, loop, transitionDuration, controlsColor, arrowsSize, arrowsPosition, showDots, showArrows, }: {
images: {
src: string;
alt?: string;
description?: string;
className?: string;
position?: "top-left" | "top" | "top-right" | "left" | "center" | "right" | "bottom-left" | "bottom" | "bottom-right";
fit?: "cover" | "contain" | "fill" | "scale-down" | "none";
duration?: number;
}[];
height: string;
width?: string;
className?: string;
imagesClassName?: string;
firstImageIndex?: number;
autoplay?: boolean;
imagesDuration?: number;
loop?: boolean;
transitionDuration?: 75 | 100 | 150 | 200 | 300 | 500 | 700 | 1000;
controlsColor?: "light" | "dark" | "transparent-light" | "transparent-dark";
arrowsSize?: "sm" | "md" | "lg" | "xl";
arrowsPosition?: "middle" | "bottom" | "bottom-center";
showDots?: boolean;
showArrows?: boolean;
}): any;