FAQ
Optimizing
Use renderWindowSize to limit how many slides are mounted around the current item. Omit it to mount all slides. Choose a value from measurements on your target devices: a smaller window reduces React work, while a larger one gives complex neighboring animations more room.
Used in ScrollView/FlatList
#143 (opens in a new tab) - Carousel suppresses ScrollView/FlatList scroll gesture handler: When a horizontal carousel is nested in a vertical ScrollView or FlatList, configure the pan gesture so small horizontal movement does not capture the parent scroll. For example, use Gesture Handler's activeOffsetX (opens in a new tab):
<Carousel
{...}
onConfigurePanGesture={(gesture) => {
gesture.activeOffsetX([-10, 10]);
}}
/>RTL
Horizontal RTL is detected from I18nManager.isRTL. Keep data in logical order: next(), autoplayDirection="forward", progress, and signed offset retain the same meaning as LTR. A physical right swipe advances in RTL. Custom itemAnimation callbacks receive logical progress, so direction-sensitive translateX output must be mirrored by the application.
Expo
Install v5 and its native peers with expo install so Expo selects compatible versions:
npx expo install react-native-reanimated-carousel react-native-reanimated react-native-worklets react-native-gesture-handlerv5 requires React Native 0.80+, Reanimated 4.1+, and React Native Worklets 0.5+. See the v5 migration guide for the validated Expo matrix and setup notes.
Working principle
How to run the example app
Build the package, then install and run the Expo app from its current location:
yarn prepare
cd example/app
yarn install
yarn ios # or: yarn android / yarn webRun the library checks from the repository root:
yarn test
yarn types
yarn lint