Swiping
By default the carousel will allow you to drag the carousel to the next slide. You can disable this by setting the swiping
prop to false
. This is only enabled on mobile devices.
Prop Name | Type | Default Value |
---|---|---|
minSwipeDistance | number | 50 |
swiping | boolean | true |
Enabled with scrollDistance="slide"
Code
<Carousel scrollDistance="slide" showDots>
<img src="pexels-01.jpg" />
<img src="pexels-02.jpg" />
<img src="pexels-03.jpg" />
</Carousel>
Enabled with scrollDistance="screen"
Code
<Carousel scrollDistance="screen" showDots>
<img src="pexels-01.jpg" />
<img src="pexels-02.jpg" />
<img src="pexels-03.jpg" />
</Carousel>
Disabled
Code
<Carousel scrollDistance="slide" showDots swiping={false}>
<img src="pexels-01.jpg" />
<img src="pexels-02.jpg" />
<img src="pexels-03.jpg" />
</Carousel>