Skip to content

Carousel

Lets users cycle through a series of items.

Installation

Anatomy

Usage

Orientation

Horizontal

Vertical

Thumbnail Indicators

Render each thumbnail inside CarouselIndicator to create a visual preview of each slide.

Horizontal

Vertical

Examples

Autoplay

Use autoplay props on Carousel to make the carousel play automatically.

Loop

Use loop prop to make the carousel loop.

Controlled

Use page and onPageChange props to control the carousel state programmatically.

Current page: 1 of 5

Slides Per Page

Display multiple slides simultaneously by setting the slidesPerPage prop on Carousel.

Spacing

Control the gap between slides using the spacing prop on Carousel.

Mouse Drag

To allow mouse drag, set the allowMouseDrag prop on Carousel.

API Reference

Root component. Manages slide state and navigation.

CarouselContent

Wraps all slides. Handles layout and transitions.

CarouselItem

Wraps a single slide.

CarouselControl

Holds prev/next navigation buttons.

CarouselPrevious

Goes to the previous slide.

CarouselNext

Goes to the next slide.

CarouselIndicatorGroup

Holds slide indicator dots or pills.

CarouselIndicator

Indicator for a slide. Click to jump to that slide.


For a complete list of props, see the Ark UI documentation.