
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
react-native-gesture-image-viewer
Advanced tools
๐ผ๏ธ React Native Image Viewer - Reanimated-powered image gestures with full control
English | ํ๊ตญ์ด
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.
Full documentation is available at: https://react-native-gesture-image-viewer.pages.dev
react-native-gesture-image-viewer
is a library focused purely on gesture interactions for complete customization.
import { useCallback, useState } from 'react';
import { ScrollView, Image, Modal, View, Text, Button, Pressable } from 'react-native';
import {
GestureViewer,
GestureTrigger,
useGestureViewerController,
useGestureViewerEvent,
} from 'react-native-gesture-image-viewer';
function App() {
const images = [...];
const [visible, setVisible] = useState(false);
const [selectedIndex, setSelectedIndex] = useState(0);
const { goToIndex, goToPrevious, goToNext, currentIndex, totalCount } = useGestureViewerController();
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}
ListComponent={ScrollView}
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>
);
}
For details on how to contribute to the project and set up the development environment, please refer to the Contributing Guide.
1.9.0
c42176d: feat: add auto-play functionality to gesture viewer with configurable interval
autoPlay
and autoPlayInterval
propsautoPlay
is enabled, the viewer will automatically play the next item after the specified intervalenableLoop
is enabled, the viewer will loop back to the first item after the last itemenableLoop
is disabled, the viewer will stop at the last itemautoPlayInterval
is optional and defaults to 3000msautoPlay
is optional and defaults to false
import { GestureViewer } from "react-native-gesture-image-viewer";
function App() {
return <GestureViewer autoPlay autoPlayInterval={3000} />;
}
FAQs
๐ผ๏ธ React Native Image Viewer - Reanimated-powered image gestures with full control
The npm package react-native-gesture-image-viewer receives a total of 407 weekly downloads. As such, react-native-gesture-image-viewer popularity was classified as not popular.
We found that react-native-gesture-image-viewer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.