react-multi-carousel vs react-responsive-carousel vs react-slick
Building Responsive Carousels in React
react-multi-carouselreact-responsive-carouselreact-slickSimilar Packages:

Building Responsive Carousels in React

react-multi-carousel, react-responsive-carousel, and react-slick are popular libraries for implementing carousel components in React applications. Each offers a different approach to handling slides, responsiveness, and server-side rendering. react-slick is a React wrapper around the jQuery-based slick-carousel, offering extensive features but carrying legacy dependencies. react-responsive-carousel focuses on simplicity and image-heavy carousels with strong SSR support. react-multi-carousel is built from scratch for React, emphasizing multiple visible items and modern React patterns without external CSS dependencies from jQuery.

Npm Package Weekly Downloads Trend

3 Years

Github Stars Ranking

Stat Detail

Package
Downloads
Stars
Size
Issues
Publish
License
react-multi-carousel01,3541.63 MB217a year agoMIT
react-responsive-carousel02,684188 kB5-MIT
react-slick011,934775 kB4897 months agoMIT

Building Responsive Carousels in React: Architecture and Trade-offs

Choosing a carousel library in React often comes down to trade-offs between feature richness, bundle weight, and long-term maintenance. react-multi-carousel, react-responsive-carousel, and react-slick all solve the same core problem but take different architectural paths. Let's compare how they handle configuration, responsiveness, SSR, and customization.

🛠️ API Design and Configuration

The way you configure these libraries differs significantly. Some use a single settings object, while others pass props directly to the component.

react-slick relies on a settings object passed to the Slider component. This mirrors the original jQuery plugin structure.

import Slider from "react-slick";

const settings = {
  dots: true,
  infinite: true,
  speed: 500,
  slidesToShow: 1
};

<Slider {...settings}>{items}</Slider>

react-responsive-carousel uses direct props on the Carousel component. This feels more idiomatic to standard React development.

import { Carousel } from "react-responsive-carousel";

<Carousel
  showArrows={true}
  infiniteLoop={true}
  autoPlay={true}
  interval={3000}
>
  {items}
</Carousel>

react-multi-carousel also uses direct props but separates responsive logic into a specific prop. This keeps the main props clean.

import Carousel from "react-multi-carousel";

<Carousel
  infinite={true}
  autoPlay={true}
  itemClass="carousel-item"
  responsive={responsiveBreakpoints}
>
  {items}
</Carousel>

📱 Handling Responsive Breakpoints

Responsiveness is where these libraries diverge the most. Your choice depends on whether you need one item or multiple items visible at once.

react-slick uses an array of breakpoint objects. Each object defines a screen width and the settings to apply below that width.

const settings = {
  responsive: [
    {
      breakpoint: 1024,
      settings: { slidesToShow: 3 }
    },
    {
      breakpoint: 600,
      settings: { slidesToShow: 1 }
    }
  ]
};

<Slider {...settings}>{items}</Slider>

react-responsive-carousel is primarily designed for single-item views (like image galleries). It handles fluid width automatically but lacks built-in configuration for showing multiple items side-by-side.

// Primarily single item focus
<Carousel showThumbs={false}>
  <img src="/img1.jpg" />
  <img src="/img2.jpg" />
</Carousel>

react-multi-carousel excels here with a dedicated responsive prop map. You define named breakpoints (desktop, tablet, mobile) and specify items per view for each.

const responsive = {
  desktop: { breakpoint: { above: 1024 }, items: 3 },
  tablet: { breakpoint: { below: 1024, above: 464 }, items: 2 },
  mobile: { breakpoint: { below: 464 }, items: 1 }
};

<Carousel responsive={responsive}>{items}</Carousel>

🌐 Server-Side Rendering (SSR)

SSR support is critical for SEO and initial load performance. Hydration mismatches can break interactivity if not handled correctly.

react-slick requires specific configuration to work with SSR. You often need to enable the ssr flag and handle window checks manually to avoid build errors.

const settings = {
  ssr: true,
  // May require dynamic import in Next.js to avoid window errors
  // import dynamic from 'next/dynamic'
};

<Slider {...settings}>{items}</Slider>

react-responsive-carousel supports SSR out of the box. It handles window checks internally, making it easier to integrate with frameworks like Next.js without extra setup.

// Works directly in server-rendered components
<Carousel>
  <div>Slide 1</div>
  <div>Slide 2</div>
</Carousel>

react-multi-carousel was built with SSR as a priority. It avoids window-dependent code during the initial render, reducing hydration issues significantly.

// Designed to match server and client output
<Carousel ssr={true} responsive={responsive}>
  <div>Slide 1</div>
  <div>Slide 2</div>
</Carousel>

🎨 Customizing Arrows and Dots

Custom UI elements are often required to match design systems. The effort needed to override defaults varies.

react-slick uses nextArrow and prevArrow props that accept React components. You must handle click events manually within those components.

const NextArrow = (props) => (
  <button onClick={props.onClick}>Next</button>
);

<Slider nextArrow={<NextArrow />}>{items}</Slider>

react-responsive-carousel allows custom rendering but often requires CSS overrides for positioning. Props like renderArrowPrev give control over the element.

<Carousel
  renderArrowPrev={(clickHandler, hasPrev) => (
    <button onClick={clickHandler} disabled={!hasPrev}>Prev</button>
  )}
>
  {items}
</Carousel>

react-multi-carousel provides customArrow and customDot props that pass necessary state and handlers. This allows full control without fighting internal styles.

<Carousel
  customArrow={CustomArrowComponent}
  customDot={CustomDotComponent}
>
  {items}
</Carousel>

🛡️ Maintenance and Long-Term Viability

The health of the repository impacts your ability to fix bugs or upgrade React versions in the future.

react-slick has a reputation for slow maintenance. Issues regarding React 18 compatibility and Strict Mode often remain open for long periods. It depends on external CSS from the original jQuery library.

// Requires importing external CSS files
import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";

react-responsive-carousel is stable and receives updates periodically. It is considered mature with fewer breaking changes expected.

// Requires importing core CSS
import "react-responsive-carousel/lib/styles/carousel.min.css";

react-multi-carousel is actively maintained with regular updates. It has no jQuery dependencies and uses styled-components or standard CSS modules internally.

// Requires importing core CSS
import "react-multi-carousel/lib/styles.css";

📊 Summary Table

Featurereact-slickreact-responsive-carouselreact-multi-carousel
API StyleSettings ObjectDirect PropsDirect Props
Multiple Items✅ Yes❌ No (Single focus)✅ Yes (Best in class)
SSR Support⚠️ Requires Config✅ Out of the Box✅ Out of the Box
DependenciesjQuery CSSNoneNone
Maintenance⚠️ Slow / Legacy✅ Stable✅ Active
CustomizationHigh (Complex)MediumHigh (Clean API)

💡 Final Recommendation

For new projects, avoid react-slick unless you have a specific requirement for its legacy features. The jQuery CSS dependency and maintenance risks make it a liability in modern React architectures.

Use react-responsive-carousel for simple image galleries, product detail views, or content carousels where only one slide is visible at a time. It is lightweight and easy to set up.

Use react-multi-carousel for complex layouts requiring multiple visible items, such as product grids, team sections, or responsive card sliders. It offers the best balance of modern React patterns, SSR support, and responsive control.

How to Choose: react-multi-carousel vs react-responsive-carousel vs react-slick

  • react-multi-carousel:

    Choose react-multi-carousel if you need to display multiple items per view with complex responsive breakpoints. It is ideal for product grids, testimonial sections, or any layout where the number of visible slides changes based on screen size. This package is also a strong choice for projects requiring robust Server-Side Rendering (SSR) without hydration mismatches.

  • react-responsive-carousel:

    Choose react-responsive-carousel if you are building a simple image gallery or product detail page where one large image is shown at a time. It works well for projects that need quick setup with minimal configuration and solid SSR support out of the box. It is less suitable for complex multi-item sliding layouts.

  • react-slick:

    Choose react-slick only if you are maintaining a legacy project that already depends on it or require specific features unique to the original slick carousel. For new projects, consider the maintenance risks and jQuery CSS dependencies. It may still fit if you need a wide range of pre-built sliding effects and do not plan to migrate away from its specific API.

README for react-multi-carousel

react-multi-carousel 👋

Financial Contributors on Open Collective All Contributors

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

Package Quality npm version download per month Build Status Documentation Maintenance License: MIT FOSSA Status David Dependancy Status Known Vulnerabilities

demo

demo

Hello world!

We are on a very excited journey towards version 3.0 of this component which will be rewritten in hooks/context completely. It means smaller bundle size, performance improvement and easier customization of the component and so many more benefits.

It would mean so much if you could provide help towards the further development of this project as we do this open source work in our own free time especially during this covid-19 crisis.

If you are using this component seriously, please donate or talk to your manager as this project increases your income too. It will help us make releases, fix bugs, fulfill new feature requests faster and better.

Become a backer/sponsor to get your logo/image on our README on Github with a link to your site.

Features.

  • Server-side rendering
  • Infinite mode
  • Dot mode
  • Custom animation
  • AutoPlay mode
  • Auto play interval
  • Supports images, videos, everything.
  • Responsive
  • Swipe to slide
  • Mouse drag to slide
  • Keyboard control to slide
  • Multiple items
  • Show / hide arrows
  • Custom arrows / control buttons
  • Custom dots
  • Custom styling
  • Accessibility support
  • Center mode.
  • Show next/previous set of items partially
  • RTL support

Shoutouts 🙏

BrowserStack Logo

Big thanks to BrowserStack for letting the maintainers use their service to debug browser issues.

Documentation

Other important links.

Bundle size

Bundle-size. 2.5kB

Demo.

Documentation is here.

Demo for the SSR https://react-multi-carousel.now.sh/

Try to disable JavaScript to test if it renders on the server-side.

Codes for SSR at github.

Codes for the documentation at github.

Install

$ npm install react-multi-carousel --save

import Carousel from 'react-multi-carousel';
import 'react-multi-carousel/lib/styles.css';

How the SSR mode works?

Codes for SSR at github.

  • Demo for the SSR are at here
  • Try to disable JavaScript to test if it renders on the server-side.

Here is a lighter version of the library for detecting the user's device type alternative

You can choose to only bundle it on the server-side.

Minimum working set up.

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>;

Common Usage

import Carousel from "react-multi-carousel";
import "react-multi-carousel/lib/styles.css";

const responsive = {
  desktop: {
    breakpoint: { max: 3000, min: 1024 },
    items: 3,
    slidesToSlide: 3 // optional, default to 1.
  },
  tablet: {
    breakpoint: { max: 1024, min: 464 },
    items: 2,
    slidesToSlide: 2 // optional, default to 1.
  },
  mobile: {
    breakpoint: { max: 464, min: 0 },
    items: 1,
    slidesToSlide: 1 // optional, default to 1.
  }
};
<Carousel
  swipeable={false}
  draggable={false}
  showDots={true}
  responsive={responsive}
  ssr={true} // means to render carousel on server-side.
  infinite={true}
  autoPlay={this.props.deviceType !== "mobile" ? true : false}
  autoPlaySpeed={1000}
  keyBoardControl={true}
  customTransition="all .5"
  transitionDuration={500}
  containerClass="carousel-container"
  removeArrowOnDeviceType={["tablet", "mobile"]}
  deviceType={this.props.deviceType}
  dotListClass="custom-dot-list-style"
  itemClass="carousel-item-padding-40-px"
>
  <div>Item 1</div>
  <div>Item 2</div>
  <div>Item 3</div>
  <div>Item 4</div>
</Carousel>;

Custom Arrows.

You can pass your own custom arrows to make it the way you want, the same for the position. For example, add media query for the arrows to go under when on smaller screens.

Your custom arrows will receive a list of props/state that's passed back by the carousel such as the currentSide, is dragging or swiping in progress.

Code

const CustomRightArrow = ({ onClick, ...rest }) => {
  const {
    onMove,
    carouselState: { currentSlide, deviceType }
  } = rest;
  // onMove means if dragging or swiping in progress.
  return <button onClick={() => onClick()} />;
};
<Carousel customRightArrow={<CustomRightArrow />} />;

Custom button group.

This is very useful if you don't want the dots, or arrows and you want to fully customize the control functionality and styling yourself.

Code

const ButtonGroup = ({ next, previous, goToSlide, ...rest }) => {
  const { carouselState: { currentSlide } } = rest;
  return (
    <div className="carousel-button-group"> // remember to give it position:absolute
      <ButtonOne className={currentSlide === 0 ? 'disable' : ''} onClick={() => previous()} />
      <ButtonTwo onClick={() => next()} />
      <ButtonThree onClick={() => goToSlide(currentSlide + 1)}> Go to any slide </ButtonThree>
    </div>
  );
};
<Carousel arrows={false} customButtonGroup={<ButtonGroup />}>
  <ItemOne>
  <ItemTwo>
</Carousel>

renderButtonGroupOutside

Passing this props would render the button group outside of the Carousel container. This is done using React.fragment

<div className='my-own-custom-container'>
  <Carousel arrows={false} renderButtonGroupOutside={true} customButtonGroup={<ButtonGroup />}>
    <ItemOne>
    <ItemTwo>
  </Carousel>
</div>

Custom dots.

You can pass your own custom dots to replace the default one.

Custom dots can also be a copy or an image of your carousel item. See example in this one

The codes for this example

You custom dots will receive a list of props/state that's passed back by the carousel such as the currentSide, is dragging or swiping in progress.

Code

const CustomDot = ({ onClick, ...rest }) => {
  const {
    onMove,
    index,
    active,
    carouselState: { currentSlide, deviceType }
  } = rest;
  const carouselItems = [CarouselItem1, CaourselItem2, CarouselItem3];
  // onMove means if dragging or swiping in progress.
  // active is provided by this lib for checking if the item is active or not.
  return (
    <button
      className={active ? "active" : "inactive"}
      onClick={() => onClick()}
    >
      {React.Children.toArray(carouselItems)[index]}
    </button>
  );
};
<Carousel showDots customDot={<CustomDot />}>
  {carouselItems}
</Carousel>;

renderDotsOutside

Passing this props would render the dots outside of the Carousel container. This is done using React.fragment

<div className='my-own-custom-container'>
  <Carousel arrows={false} showDots={true} renderDotsOutside={renderButtonGroupOutside}>
    <ItemOne>
    <ItemTwo>
  </Carousel>
</div>

partialVisible props.

Shows the next items partially, this is very useful if you want to indicate to the users that this carousel component is swipable, has more items behind it.

This is different from the "centerMode" prop, as it only shows the next items. For the centerMode, it shows both.

const responsive = {
  desktop: {
    breakpoint: { max: 3000, min: 1024 },
    items: 3,
    partialVisibilityGutter: 40 // this is needed to tell the amount of px that should be visible.
  },
  tablet: {
    breakpoint: { max: 1024, min: 464 },
    items: 2,
    partialVisibilityGutter: 30 // this is needed to tell the amount of px that should be visible.
  },
  mobile: {
    breakpoint: { max: 464, min: 0 },
    items: 1,
    partialVisibilityGutter: 30 // this is needed to tell the amount of px that should be visible.
  }
}
<Carousel partialVisible={true} responsive={responsive}>
  <ItemOne />
  <ItemTwo />
</Carousel>

centerMode

Shows the next items and previous items partially.

<Carousel centerMode={true} />

afterChange callback.

This is a callback function that is invoked each time when there has been a sliding.

<Carousel
  afterChange={(previousSlide, { currentSlide, onMove }) => {
    doSpeicalThing();
  }}
/>

beforeChange call back

This is a callback function that is invoked each time before a sliding.

<Carousel
  beforeChange={(nextSlide, { currentSlide, onMove }) => {
    doSpeicalThing();
  }}
/>

Combine beforeChange and nextChange, real usage.

They are very useful in the following cases:

  • The carousel item is clickable, but you don't want it to be clickable while the user is dragging it or swiping it.
<Carousel
  beforeChange={() => this.setState({ isMoving: true })}
  afterChange={() => this.setState({ isMoving: false })}
>
  <a
    onClick={e => {
      if (this.state.isMoving) {
        e.preventDefault();
      }
    }}
    href="https://w3js.com"
  >
    Click me
  </a>
</Carousel>
  • Preparing for the next slide.
<Carousel beforeChange={nextSlide => this.setState({ nextSlide: nextSlide })}>
  <div>Initial slide</div>
  <div
    onClick={() => {
      if (this.state.nextSlide === 1) {
        doVerySpecialThing();
      }
    }}
  >
    Second slide
  </div>
</Carousel>

Skipping callbacks

When calling the goToSlide function on a Carousel the callbacks will be run by default. You can skip all or individul callbacks by passing a second parameter to goToSlide.

this.Carousel.goToSlide(1, true); // Skips both beforeChange and afterChange
this.Carousel.goToSlide(1, { skipBeforeChange: true }); // Skips only beforeChange
this.Carousel.goToSlide(1, { skipAfterChange: true }); // Skips only afterChange

focusOnSelect

Go to slide on click and make the slide a current slide.

<Carousel focusOnSelect={true} />

Using ref.

<Carousel ref={(el) => (this.Carousel = el)} arrows={false} responsive={responsive}>
  <ItemOne />
  <ItemTwo />
</Carousel>
<button onClick={() => {
    const nextSlide = this.Carousel.state.currentSlide + 1;
     // this.Carousel.next()
     // this.Carousel.goToSlide(nextSlide)
  }}>Click me</button>

additionalTransfrom Props.

This is very useful when you are fully customizing the control functionality by yourself like this one

Code

For example if you give to your carousel item padding left and padding right 20px. And you have 5 items in total, you might want to do the following:

<Carousel ref={el => (this.Carousel = el)} additionalTransfrom={-20 * 5} /> // it needs to be a negative number

Specific Props

NameTypeDefaultDescription
responsiveobject{}Numbers of slides to show at each breakpoint
deviceTypestring''Only pass this when use for server-side rendering, what to pass can be found in the example folder
ssrbooleanfalseUse in conjunction with responsive and deviceType prop
slidesToSlideNumber1How many slides to slide.
draggablebooleantrueOptionally disable/enable dragging on desktop
swipeablebooleantrueOptionally disable/enable swiping on mobile
arrowsbooleantrueHide/Show the default arrows
renderArrowsWhenDisabledbooleanfalseAllow for the arrows to have a disabled attribute instead of not showing them
removeArrowOnDeviceTypestring or array''Hide the default arrows at different break point, should be used with responsive props. Value could be mobile or ['mobile', 'tablet'], can be a string or array
customLeftArrowjsxnullReplace the default arrow with your own
customRightArrowjsxnullReplace the default arrow with your own
customDotjsxnullReplace the default dots with your own
customButtonGroupjsxnullFully customize your own control functionality if you don't want arrows or dots
infinitebooleanfalseEnables infinite scrolling in both directions. Carousel items are cloned in the DOM to achieve this.
minimumTouchDragnumber50The amount of distance to drag / swipe in order to move to the next slide.
afterChangefunctionnullA callback after sliding everytime.
beforeChangefunctionnullA callback before sliding everytime.
sliderClassstring'react-multi-carousel-track'CSS class for inner slider div, use this to style your own track list.
itemClassstring''CSS class for carousel item, use this to style your own Carousel item. For example add padding-left and padding-right
containerClassstring'react-multi-carousel-list'Use this to style the whole container. For example add padding to allow the "dots" or "arrows" to go to other places without being overflown.
dotListClassstring'react-multi-carousel-dot-list'Use this to style the dot list.
keyBoardControlbooleantrueUse keyboard to navigate to next/previous slide
autoPlaybooleanfalseAuto play
autoPlaySpeednumber3000The unit is ms
showDotsbooleanfalseHide the default dot list
renderDotsOutsidebooleanfalseShow dots outside of the container
partialVisiblebooleanstringfalse
customTransitionstringtransform 300ms ease-in-outConfigure your own anaimation when sliding
transitionDuration`number300The unit is ms, if you are using customTransition, make sure to put the duration here as this is needed for the resizing to work.
focusOnSelectbooleanfalseGo to slide on click and make the slide a current slide.
centerModebooleanfalseShows the next items and previous items partially.
additionalTransfromnumber0additional transfrom to the current one.
shouldResetAutoplaybooleantrueresets autoplay when clicking next, previous button and the dots
rewindbooleanfalseif infinite is not enabled and autoPlay explicitly is, this option rewinds the carousel when the end is reached (Lightweight infinite mode alternative without cloning).
rewindWithAnimationbooleanfalsewhen rewinding the carousel back to the beginning, this decides if the rewind process should be instant or with transition.
rtlbooleanfalseSets the carousel direction to be right to left

Author

👤 Yi Zhuang

🤝 Contribute

Please read https://github.com/YIZHUANG/react-multi-carousel/blob/master/contributing.md

Submit an issue for feature request or submit a pr.

Local development.

  • cd app
  • npm install
  • npm run dev

Donation

If this project help you reduce time to develop, you can give me a cup of coffee :)

paypal

Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

License

FOSSA Status

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Truong Hoang Dung

💻

Tobias Pinnekamp

💻

Rajendran Nadar

💻

Abhinav Dalal

💻

Oscar Barrett

💻

Neamat Mim

💻

Martin Retrou

💻

Ben Hodgson

💻

Faizan ul haq

💻

Adrian3PG

💻

kuznetsovgm

💻

Vadim Filimonov

📖

Romain

💻

Riley Lundquist

💻

Paul Deshaies Jr

💻

Pavel Mikheev

💻

nev1d

💻

Mads Vammen

💻

Jiro Farah

💻

This project follows the all-contributors specification. Contributions of any kind welcome!