React-Native Horizontal Scroll View Pagination: Preview Next Page/Card

I spend a lot of time fighting with this until I figured it out so here is my solution if it helps someone.

https://snack.expo.io/H1CnjIeDb

Problem was all these were required and pagination should be turned off

horizontal={true}
decelerationRate={0}
snapToInterval={width - 60}
snapToAlignment={"center"}

You can absolutely do that with ScrollView or, even better, FlatList. However, the really tricky part is the snapping effect. You can use props snapToInterval and snapToAlignment to achieve it (see Vasil Enchev's answer); unfortunately, these are iOS-only.

A co-worker and I created a plugin that answers this particular need. We ended up open-sourcing it, so it's all yours to try: react-native-snap-carousel.

The plugin is now built on top of FlatList (versions >= 3.0.0), which is great to handle huge numbers of items. It provides previews (the effect you're after), snapping effect for iOS and Android, parallax images, RTL support, and more.

You can take a look at the showcase to get a grasp of what can be achieved with it. Do not hesitate to share your experience with the plugin since we're always trying to improve it.

react-native-snap-carousel archriss showcasereact-native-snap-carousel archriss aix


Edit : two new layouts have been introduced in version 3.6.0 (one with a stack of cards effect and the other with a tinder-like effect). Enjoy!

react-native-snap-carousel stack layoutreact-native-snap-carousel tinder layout