Awesome gallery with Reanimated v2
npm install react-native-awesome-gallery
If you love using React Native Awesome Gallery and would like to show your appreciation, you can support the project by buying me a coffee. Your support helps me keep the project alive and continuously improving. Every little bit counts!

Basic usage | With toolbar | Loop |
![]() | ![]() | ![]() |
- Zoom to scale
- Double tap to scale
- Native iOS feeling (rubber effect, decay animation on pan gesture)
- RTL support
- Fully customizable
- Both orientations (portrait + landscape)
- Infinite list
- Supports both iOS and Android.
> _Note:_ Starting from v0.3.6 using Reanimated v3 is required
First you have to follow installation instructions of Reanimated v3 and react-native-gesture-handler
``sh`
yarn add react-native-awesome-gallery
Expo is supported since SDK 40. More information here
Check out an example folder for example with Expo Image
`js
import Gallery from 'react-native-awesome-gallery';
// ...
const images = ['https://image1', 'https://image2'];
return (
onIndexChange={(newIndex) => {
console.log(newIndex);
}}
/>
);
`
| Prop | Description | Type | Default |
|----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------|------------------------------------------------------------------------|
| data | Array of items to render | T[] | undefined |FastImage
| renderItem? | Callback func which can be used to render custom image component, e.g . NOTE: You have to call setImageDimensions({width, height}) parameter after image is loaded | (renderItemInfo: {item: T, index: number, setImageDimensions: Function}) => React.ReactElement | undefined |(item: T, index: number) => string or number
| keyExtractor? | Callback func which provides unique keys for items | | Takes id or key or _id from Item, otherwise puts Item as key |number
| initialIndex? | The initial image index | | 0 |(newIndex: number) => void
| onIndexChange? | Is called when index of active item is changed | | undefined |number
| numToRender? | Amount of items rendered in gallery simultaneously | | 5 |number
| emptySpaceWidth? | Width of empty space between items | | 30 |number
| doubleTapScale? | Image scale when double tap is fired | | 3 |number
| doubleTapInterval? | Time in milliseconds between single and double tap events | | 500 |number
| maxScale? | Maximum scale user can set with gesture | | 6 |boolean
| pinchEnabled? | Is pinch gesture enabled | | true |boolean
| swipeEnabled? | Is pan gesture enabled | | true |boolean
| doubleTapEnabled? | Is double tap enabled | | true |boolean
| disableTransitionOnScaledImage? | Disables transition to next/previous image when scale > 1 | | false |boolean
| hideAdjacentImagesOnScaledImage? | Hides next and previous images when scale > 1 | | false |boolean
| disableVerticalSwipe? | Disables vertical swipe when scale == 1 | | false |boolean
| disableSwipeUp? | Disables swipe up when scale == 1 | | false |data.length > 1
| loop? | Allows user to swipe infinitely. Works when | boolean | false |(scale: number) => void
| onScaleChange? | Is called when scale is changed | | undefined |onScaleChange
| onScaleChangeRange? | Shows range of scale in which is called | {start: number, end: number} | undefined |{width: number, height: number}
| containerDimensions? | Dimensions object for the View that wraps gallery. | | value returned from useWindowDimensions() hook. |ViewStyle
| style? | Style of container | | undefined |
| Prop | Description | Type |
|------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|------------|
| onSwipeToClose() | Fired when user swiped to top/bottom | Function |'worklet';
| onTranslationYChange(translationY: number, shouldClose: boolean) | Fired when user is swiping vertically to close the gallery | Worklet |Function
| onTap() | Fired when user tap on image | |Function
| onDoubleTap(toScale: number) | Fired when user double tap on image | |Function
| onLongPress() | Fired when long press is detected | |Function
| onScaleStart(scale: number) | Fired when pinch gesture starts | |scale > maxScale
| onScaleEnd(scale: number) | Fired when pinch gesture ends. Use case: add haptic feedback when user finished gesture with or scale < 1 | Function |Function
| onPanStart() | Fired when pan gesture starts | |
`js
import Gallery, { GalleryRef } from 'react-native-awesome-gallery';
// ...
const ref = useRef
`
| Prop | Description | Type |
|----------|---------------------------|--------------------------------------------------|
| setIndex | Sets active index | (newIndex: number, animated?: boolean) => void |(animated?: boolean) => void` |
| reset | Resets scale, translation |
MIT