Carousel

Pictures side by side that a swipe turns one at a time, with a count over the corner and dots under them.

import { Carousel } from "@plexui/react-native"

Examples

Overview

Post

Platforms

iOS 26Android
Native componentNone: a paging scroll view of pictures, drawn as a post's carousel of photosA horizontal pager of pictures
LookPictures a swipe turns, a count over the corner, dots under themThe same, the scroll snapping as Android's does

API

PropTypeDefaultDescription
childrenReactNode—The pictures, one a page, each filling it
pagenumber—The picture shown, by its index (controlled); set it and the carousel slides there
defaultPagenumber0The first picture shown (uncontrolled)
onPageChange(page: number) => void—Called with the picture a swipe, a dot or the app comes to rest on
onPageScroll(position: number) => void—Called on every frame the pictures move (a finger, the paging spring, a dot) with their place as a fractional page, from 0 to the last: for what stands over the carousel and moves with a picture
gapnumber0Room between two pictures in points, seen only while they move
counterbooleantrueThe count over the top end corner, while the pictures turn and three seconds after
dots"below" | "over" | "none""below"The page dots: under the pictures, over their foot in white, or none
dotsBackground"minimal" | "automatic" | "prominent""minimal"The capsule behind the dots: none, while a finger presses or scrubs them, or always (none on Android)
aspectRationumber—The pictures' width over their height; without it they fill the height given
testIDstring—Test id; the count and the dots take it with -counter and -dots
styleStyleProp<ViewStyle>—Style of the carousel