MindeesUI
ComponentsDisplay

Carousel

A paged horizontal scroller with page-indicator dots, driven by data or by direct children.

Carousel is a paging horizontal ScrollView where each page snaps to the container width. Supply pages either as data (items plus renderItem) or as direct children. Page-indicator dots track the active page, and onPageChange fires as the active page changes.

Import

import { Carousel } from '@mindees/ui';

Usage

<Carousel items={slides} renderItem={(slide) => <Slide {...slide} />} onPageChange={setPage} />

With direct children:

<Carousel>
  <FirstPage />
  <SecondPage />
</Carousel>

Props

PropTypeDefaultDescription
itemsreadonly T[]Data-driven pages; pair with renderItem.
renderItem(item: T, index: number) => ReactNodeRenders one page per item.
childrenReactNodeChild-driven pages; each child is one page.
showDotsbooleantrueShow the page-indicator dots.
onPageChange(index: number) => voidCalled when the active page changes.
styleStyleProp<ViewStyle>Style applied to the root container.

Inherits the remaining ViewProps (except style and children).

Accessibility

The dots row uses accessibilityRole="adjustable" and exposes the current page via accessibilityValue (1-based). The scroller and pages are marked none; label the page content itself for screen-reader clarity.

On this page