saseungmin/react-native-gesture-image-viewer
saseungmin/react-native-gesture-image-viewer has 91 GitHub stars and 7 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-16 04:40 UTC. Last push 2026-10-27.
What you can do
- ๐ค Complete Gesture Support - Pinch zoom, double-tap zoom, swipe navigation, pan when zoomed-in, and vertical drag to dismiss
- ๐๏ธ High-Performance Animations - Smooth and responsive animations at 60fps and beyond, powered by React Native Reanimated
- ๐จ Full Customization - Total control over components, styles, and gesture behavior
- ๐๏ธ External Control API - Trigger actions programmatically from buttons or other UI components
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
About
๐ผ๏ธ React Native Image Viewer - Reanimated-powered image gestures with full control
Web & AppsREADME.md
OriginalReact Native Gesture Image Viewer
English | ํ๊ตญ์ด
Overview
Have you ever struggled with implementing complex gesture handling and animations when building image galleries or content viewers in React Native?
Existing libraries often have limited customization options or performance issues. react-native-gesture-image-viewer is a high-performance universal gesture viewer library built on React Native Reanimated and Gesture Handler, providing complete customization and intuitive gesture support for not only images but also videos, custom components, and any other content.
Key Features
- ๐ค Complete Gesture Support - Pinch zoom, double-tap zoom, swipe navigation, pan when zoomed-in, and vertical drag to dismiss
- ๐๏ธ High-Performance Animations - Smooth and responsive animations at 60fps and beyond, powered by React Native Reanimated
- ๐จ Full Customization - Total control over components, styles, and gesture behavior
- ๐๏ธ External Control API - Trigger actions programmatically from buttons or other UI components
- ๐งฉ Multi-Instance Management - Manage multiple viewers independently using unique IDs
- ๐งฌ Flexible Integration - Use with Modal, React Native Modal, Expo Image, FastImage, videos, and custom content
- ๐ง Full TypeScript Support - Great developer experience with type inference and safety
- ๐ Cross-Platform - Runs on iOS, Android, and Web with Expo Go and New Architecture compatibility
- ๐ช Easy-to-Use API - Simple and intuitive API that requires minimal setup
Quick Start
๐ Documentation
Full documentation is available at: https://react-native-gesture-image-viewer.pages.dev
v3 is stable. Install
react-native-gesture-image-viewerand follow the v2 โ v3 migration guide. For v2 maintenance releases, installreact-native-gesture-image-viewer@2and use the v2 docs.
Examples & Demo
- ๐ Example Project - Real implementation code with various use cases
- ๐ฅ Expo Go (v3 demo) - Try it instantly on Expo Snack
๐ค AI
- llms.txt: A structured index file containing the titles, links, and brief descriptions of all documentation pages.
- llms-full.txt: A full-content file that concatenates the complete content of every documentation page into a single file.
Basic Usage
react-native-gesture-image-viewer is a library focused purely on gesture interactions for complete customization.
import { useCallback, useState } from 'react';
import { Image, Modal, View, Text, Button, Pressable } from 'react-native';
import {
GestureViewer,
GestureTrigger,
useGestureViewerController,
useGestureViewerEvent,
useGestureViewerState,
} from 'react-native-gesture-image-viewer';
function App() {
const images = [...];
const [visible, setVisible] = useState(false);
const [selectedIndex, setSelectedIndex] = useState(0);
const { goToIndex, goToPrevious, goToNext } = useGestureViewerController();
const { currentIndex, totalCount } = useGestureViewerState();
const openModal = (index: number) => {
setSelectedIndex(index);
setVisible(true);
};
const renderImage = useCallback((imageUrl: string) => {
return <Image source={{ uri: imageUrl }} style={{ width: '100%', height: '100%' }} resizeMode="contain" />;
}, []);
useGestureViewerEvent('zoomChange', (data) => {
console.log(`Zoom changed from ${data.previousScale} to ${data.scale}`);
});
return (
<View>
{images.map((uri, index) => (
<GestureTrigger key={uri} onPress={() => openModal(index)}>
<Pressable>
<Image source={{ uri }} />
</Pressable>
</GestureTrigger>
))}
<Modal transparent visible={visible}>
<GestureViewer
data={images}
initialIndex={selectedIndex}
renderItem={renderImage}
pageSpacing={16}
onDismiss={() => setVisible(false)}
/>
<View>
<Button title="Prev" onPress={goToPrevious} />
<Button title="Jump to index 2" onPress={() => goToIndex(2)} />
<Button title="Next" onPress={goToNext} />
<Text>{`${currentIndex + 1} / ${totalCount}`}</Text>
</View>
</Modal>
</View>
);
}
Contributing
For details on how to contribute to the project and set up the development environment, please refer to the Contributing Guide.