Skip to main content

Carousel

A horizontally paged scroll view with a dot-page indicator.

#0d9488
#e5193a
#2563eb
<Carousel
data={slides}
renderItem={(slide) => <SlideCard slide={slide} />}
/>

Props​

PropTypeDefaultDescription
dataTItem[]Required. Items to page through.
renderItem(item: TItem, index: number) => ReactNodeRequired. Renders each page.
keyExtractor(item: TItem, index: number) => stringKeys each page; defaults to its index.
itemWidthnumberWidth of each page. Defaults to the carousel's own measured width (full-bleed paging).
showIndicatorbooleantrueShows the dot-page indicator below the carousel.
activeDotColorTVajraColors'primary'Color of the active page's dot.
inactiveDotColorTVajraColors'border'Color of inactive dots.
onIndexChange(index: number) => voidCalled when the active page changes.