Getting started
Install the package, add the libraries it builds on, and the carousel on the right is yours. Next: Usage shows this demo’s code, ready to copy.
Installation
Section titled “Installation”npx expo install expo-morph-carousel @shopify/react-native-skia expo-file-system \ react-native-reanimated react-native-worklets react-native-gesture-handlerTwo of these are optional:
| Package | Needed for | Without it |
|---|---|---|
@shopify/react-native-skia |
The liquid effect (the default) |
The carousel uses crossfade |
expo-file-system |
The disk cache for remote images on iOS and Android | Remote images load from the network each time (the platform’s HTTP cache still applies) |
babel.config.js must use babel-preset-expo, which enables the worklets Babel plugin. Wrap the app in GestureHandlerRootView.
Skia runs on CanvasKit on web, a WebAssembly file that has to be served by your app. Copy it into public/ once:
npx setup-skia-web publicThe carousel loads CanvasKit in the background and shows a cross-fade until it is ready. To load the file from somewhere else, call configureSkiaWeb({ locateFile: (file) => 'https://…/' + file }) before the first carousel renders.
Compatibility
Section titled “Compatibility”| Supported | |
|---|---|
| Expo SDK | 58 or later |
| React Native | 0.80 or later (New Architecture) |
| Reanimated | 4 or later, with react-native-worklets |
| React Native Skia | 2 or later (optional) |
| Platforms | iOS, Android, web |
| Expo Go | Yes. The package has no native code of its own |