Your project needs to use React 16.8 or later.
Add react-carousel to your project by executing npm install react-carousel-cs or yarn add react-carousel-cs.
Here's an example of basic usage:
import Carousel from 'react-carousel-cs';
import "react-carousel-cs/dist/carousel.css";
function MyApp() {
const images = [
"assets/carousel/keno.jpeg",
"assets/carousel/Roulette.jpg",
"assets/carousel/Boom City.jpg",
"assets/carousel/Lucky6.jpeg",
"assets/carousel/Roulette.jpg",
"assets/carousel/7Bet.jpeg",
"assets/carousel/Sweet Bonanza CandyLand.jpeg",
"assets/carousel/Game shows.jpg",
"assets/carousel/Boom City.jpg",
"assets/carousel/7Bet.jpeg",
"assets/carousel/Vegas Ball Bonanza.jpg",
"assets/carousel/Boom City.jpg"
];
const customZoomAnimation = {
initial: { scale: 0.8, opacity: 0 },
animate: { scale: 1, opacity: 1 },
exit: { scale: 0.8, opacity: 0 },
};
return (
<div>
<Carousel images={images} speed={15} pauseOnHover={true} showSlideInfo={true} showSlideChangeButton={true} thumbNails={true} progressBar={true} customAnimation={customZoomAnimation} />
</div>
);
}
The MIT License.