Skip to main content

Navigation

The carousel supports several navigation options, including arrows and dots. You can also control whether the carousel should wrap around when the first or last slide is active.

Prop NameTypeDefault Value
showArrowsboolean | "always" | "hover"false
showDotsbooleanfalse
wrapModenowrap | wrapnowrap

When set to true or always, the arrows will always be visible. When set to hover, the arrows will be visible only when the mouse is over the carousel.

Code

<Carousel showArrows>
<img src="pexels-01.jpg" />
<img src="pexels-02.jpg" />
<img src="pexels-03.jpg" />
</Carousel>

Code

<Carousel showArrows>
<img src="pexels-01.jpg" />
<img src="pexels-02.jpg" />
<img src="pexels-03.jpg" />
</Carousel>

Wrapping

If you set wrapMode to wrap, the carousel will wrap around when it reaches the end of the slide set. This means that if you are on the last slide and you click next, it will go to the first slide.

Code

<Carousel showArrows wrapMode="wrap">
<img src="pexels-01.jpg" />
<img src="pexels-02.jpg" />
<img src="pexels-03.jpg" />
</Carousel>

Code

<Carousel showDots>
<img src="pexels-01.jpg" />
<img src="pexels-02.jpg" />
<img src="pexels-03.jpg" />
</Carousel>