Import
Component Parts
component
The root container with state management
component
Container for carousel items with transition support
component
Individual carousel slide
component
Navigation button container
component
Individual navigation button (prev/next)
component
Overlay caption for slides
component
Container for slide indicators
component
Individual slide indicator button
Carousel.Root
The root container that manages carousel state and auto-slide functionality.Props
React.ElementType
default:"div"
The element type to render as
ImagesType
required
Array of images to display. Can be an array of strings (URLs) or an array of objects with string properties
React.ReactNode
required
Child components
boolean
Enable automatic slide transitions
number
Interval in milliseconds between auto-slide transitions
boolean
Pause auto-slide when hovering over the carousel
() => void
Callback fired when navigation buttons are clicked
object
Custom class names for carousel parts
base?: string- Root container classesscrollContainer?: string- Scroll container classes
Data Attributes
data-scope="carousel"data-part="content"data-slot="carousel-content"
Carousel.ItemList
Container for carousel items with smooth transition animations.Props
string
CSS class names to apply to the item list
TArray
Optional array to iterate over. If not provided, uses the images array from Carousel.Root
React.ReactNode | RenderPropFn
Child components or render functionWhen using a render function, it receives:
image- Current array itemindex- Current indexarray- Full array
Data Attributes
data-scope="carousel"data-part="item-list"data-slot="carousel-item-list"
Carousel.Item
Individual carousel slide.Props
string
CSS class names to apply to the item. Default styles include snap-center and full width
React.ReactNode
Content to display in the slide
Data Attributes
data-scope="carousel"data-part="item"data-slot="carousel-item"
Carousel.Controls
Container for previous and next navigation buttons.Props
object
Custom class names for control parts
base?: string- Controls container classesiconContainer?: string- Icon wrapper classesdefaultIcon?: string- Default chevron icon classes
object
Custom icon configurationOption 1: Single icon with rotation
icon?: React.ReactElement- Custom icon elementiconType: "prevIcon" | "nextIcon"- Which direction is the base icon
prev?: React.ReactElement- Previous button iconnext?: React.ReactElement- Next button icon
Data Attributes
data-scope="carousel"data-part="controls"data-slot="carousel-controls"
Carousel.Button
Individual navigation button for previous or next slide.Props
'prev' | 'next'
required
Button direction
object
Custom class names for button parts
base?: string- Button container classesiconContainer?: string- Icon wrapper classesdefaultIcon?: string- Default chevron icon classes
React.ReactElement
Custom icon element to display
Data Attributes
data-scope="carousel"data-part="button"data-slot="carousel-button"
Carousel.Caption
Overlay caption element for slides.Props
React.ElementType
default:"div"
The element type to render as
string
CSS class names to apply. Default includes absolute positioning and z-10
React.ReactNode
Caption content
Data Attributes
data-scope="carousel"data-part="caption"data-slot="carousel-caption"
Carousel.IndicatorList
Container for slide indicator buttons.Props
string
CSS class names to apply to the indicator list
TArray
Optional array to iterate over. If not provided, uses the images array from Carousel.Root
React.ReactNode | RenderPropFn
Child components or render functionWhen using a render function, it receives:
image- Current array itemindex- Current indexarray- Full array
Data Attributes
data-scope="carousel"data-part="indicator-list"data-slot="carousel-indicator-list"
Carousel.Indicator
Individual slide indicator button.Props
number
required
The slide index this indicator represents
object
Custom class names for indicator parts
base?: string- Indicator button classesisActive?: string- Active state classes
Data Attributes
data-scope="carousel"data-part="indicator"data-slot="carousel-indicator"