Pager

Pages side by side that a swipe turns one at a time, under a segmented control or a page control.

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

Examples

Overview

Platforms

iOS 26Android
Native componentPage view controller (a paging scroll view)Horizontal pager
LookPages a swipe turns, under a segmented controlPages a swipe turns, under the tabs, the indicator following the swipe

API

PropTypeDefaultDescription
pagenumber—The page shown, by its index in the children's order (controlled)
onPageChange(page: number) => void—Called with the page a swipe comes to rest on
onPageScroll(position: number) => void—Called on every frame of a swipe or a move with a fractional page, for SegmentedControl's position or PageControl's
scrollEnabledbooleantrueWhether a swipe turns the pages; off, only page does
gapnumber0Room between two pages in points, seen only while they move; at rest a page fills the pager
childrenReactNode—The pages, one child each, each as wide as the pager
testIDstring—Test id
styleStyleProp<ViewStyle>—Style of the pager