Production-ready, lightweight fully customizable React carousel component that rocks supports multiple items and SSR(Server-side rendering).
Docs
https://w3js.com/react-multi-carousel
Github
https://github.com/YIZHUANG/react-multi-carousel
npm
https://www.npmjs.com/package/react-multi-carousel
Syntax
import Carousel from "react-multi-carousel";
import "react-multi-carousel/lib/styles.css";
const responsive = {
superLargeDesktop: {
// the naming can be any, depends on you.
breakpoint: { max: 4000, min: 3000 },
items: 5
},
desktop: {
breakpoint: { max: 3000, min: 1024 },
items: 3
},
tablet: {
breakpoint: { max: 1024, min: 464 },
items: 2
},
mobile: {
breakpoint: { max: 464, min: 0 },
items: 1
}
};
<Carousel responsive={responsive}>
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
<div>Item 4</div>
</Carousel>;