2

I just started learning ReactJS and had to port an existing template to a ReactJS one. Currently I'm having trouble implementing rows in react-slick. I've seen many asking for this since 2015, but it was not answered. Even the new Nuka Carousel created specifically for ReactJS from the same author as Slick-Carousel, did not implement support for rows.

What is the best workaround for having rows in react-slick or nuka-carousel?

claireckc
  • 395
  • 2
  • 11

1 Answers1

1

It's been a little while since this question was posted, but React-Slick now supports multiple rows as a configurable setting with the keys slidesPerRow and rows as seen here.

export default class MultipleRows extends Component {
  render() {
    const settings = {
      rows: 2,
      slidesPerRow: 2
    };
    return (
      <div>
        <Slider {...settings}>
          <div>
            <h3>1</h3>
          </div>
          <div>
            <h3>2</h3>
          </div>
          <div>
            <h3>3</h3>
          </div>
          <div>
            <h3>4</h3>
          </div>
        </Slider>
      </div>
    );
  }
}
Nathan Smith
  • 683
  • 1
  • 10
  • 24
crunchyave
  • 56
  • 1
  • 7