Search code examples
reactjsreact-slick

How can Slider auto selected second dots instead of the first dots React Slick


My setting:

const settings= {
        infinite: false,
        slidesToShow: 1,
        slidesToScroll: 1,
        arrows: false,
        dots: true,
        nextArrow: <NextArrow />,
        prevArrow: <PrevArrow />,
        dotsClass: "slick-dots mb-9"
    };

enter image description here


Solution

  • You can use initialSlide:1 in your settings object

    you can check more here on API's doc by React Slick https://react-slick.neostack.com/docs/api#initialSlide