This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
HorizontalPager
A Jetpack Compose HorizontalPager component for swipeable pages.
Expo UI HorizontalPager matches Jetpack Compose's HorizontalPager — a horizontally scrolling pager that snaps to individual pages.
HorizontalPager does not impose its own height — give it one with the height modifier or place it inside a parent with a finite height.


Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
Usage
Uncontrolled
The pager owns its scroll position natively. Use initialPage to pick the starting page, and listen for changes with onCurrentPageChange (fires mid-swipe as the snap target flips) or onSettledPageChange (fires only after the swipe settles).
Programmatic navigation
Attach a ref and call animateScrollToPage or scrollToPage on it. These mirror Compose's PagerState.animateScrollToPage and PagerState.scrollToPage.
Page spacing and content padding
Use pageSpacing to add a gap between pages (visible during swipe) and contentPadding to inset the pager so neighboring pages peek at rest.
API
import { HorizontalPager } from '@expo/ui/jetpack-compose';
No API data file found, sorry!