Carousel

Scroll-snap slide deck with previous/next controls and dot indicators

Category: display · WCAG 2.2-AA · slider, gallery, slideshow, deck, scroll-snap

Props

PropTypeDefaultDescription
labelsCarouselLabelsOverrides for the component’s user-visible strings (i18n).
childrenReactNodeSlides as children
slidesReactNode[]Slides as an array
indexnumberControlled active index
defaultIndexnumber0The initial slide index when uncontrolled.
onIndexChange(index: number) => voidCalled with the new slide index when it changes.
loopbooleanfalseWhen true, navigation wraps around from end to start.

Design tokens

When to use

When not to use

How to build an accessible Carousel in React →

Examples

Basic

<Carousel>
  <img src="/1.jpg" alt="" />
  <img src="/2.jpg" alt="" />
</Carousel>

Looping with array

<Carousel loop slides={[<Slide1 />, <Slide2 />, <Slide3 />]} />

Related components

← Back to docs