Gathering detailed insights and metrics for @tdanks2000/react-native-image-zoom
Gathering detailed insights and metrics for @tdanks2000/react-native-image-zoom
Gathering detailed insights and metrics for @tdanks2000/react-native-image-zoom
Gathering detailed insights and metrics for @tdanks2000/react-native-image-zoom
npm install @tdanks2000/react-native-image-zoom
Typescript
Module System
Min. Node Version
Node Version
NPM Version
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
22
A performant and customizable image zoom component
built with Reanimated v2+ and TypeScript. 🌃 🚀
Demo:
minScale
and maxScale
props, you can set the minimum and maximum zoom levels for your images, giving you precise control over the zooming experience.onInteractionStart
, onInteractionEnd
, onPinchStart
, onPinchEnd
, onPanStart
, and onPanEnd
that allow you to handle image interactions and customize the user experience.Reanimated v2
& Reanimated v3
.TypeScript
, providing type safety and improving the maintainability of your code.To use the ImageZoom
component, you first need to install the package via npm or yarn. Run either of the following commands:
1npm install @likashefqet/react-native-image-zoom
1yarn add @likashefqet/react-native-image-zoom
🚨 🚨 Please note that this library is built with React Native Reanimated v2 and uses React Native Gesture Handler. If you haven't installed Reanimated and Gesture Handler yet, please follow the installation instructions for Reanimated and Gesture Handler.
First, import the ImageZoom
component from the @likashefqet/react-native-image-zoom
library:
1import { ImageZoom } from '@likashefqet/react-native-image-zoom';
To use the ImageZoom
component, simply pass the uri prop with the URL of the image you want to zoom:
1<ImageZoom uri={imageUri} />
1<ImageZoom 2 uri={imageUri} 3 minScale={0.5} 4 maxScale={3} 5 onInteractionStart={() => console.log('Interaction started')} 6 onInteractionEnd={() => console.log('Interaction ended')} 7 onPinchStart={() => console.log('Pinch gesture started')} 8 onPinchEnd={() => console.log('Pinch gesture ended')} 9 onPanStart={() => console.log('Pan gesture started')} 10 onPanEnd={() => console.log('Pan gesture ended')} 11 renderLoader={() => <CustomLoader />} 12 resizeMode="cover" 13/>
All React Native Image Props
&
Property | Type | Default | Description |
---|---|---|---|
uri | String | '' (empty string) | The image's URI, which can be overridden by the source prop. |
minScale | Number | 1 | The minimum scale allowed for zooming. |
maxScale | Number | 5 | The maximum scale allowed for zooming. |
minPanPointers | Number | 2 | The minimum number of pointers required to enable panning. |
maxPanPointers | Number | 2 | The maximum number of pointers required to enable panning. |
isPanEnabled | Boolean | true | Determines whether panning is enabled within the range of the minimum and maximum pan pointers. |
isPinchEnabled | Boolean | true | Determines whether pinching is enabled. |
onInteractionStart | Function | undefined | A callback triggered when the image interaction starts. |
onInteractionEnd | Function | undefined | A callback triggered when the image interaction ends. |
onPinchStart | Function | undefined | A callback triggered when the image pinching starts. |
onPinchEnd | Function | undefined | A callback triggered when the image pinching ends. |
onPanStart | Function | undefined | A callback triggered when the image panning starts. |
onPanEnd | Function | undefined | A callback triggered when the image panning ends. |
Please refer to the Releases section on the GitHub repository. Each release includes a detailed list of changes made to the library, including bug fixes, new features, and any breaking changes. We recommend reviewing these changes before updating to a new version of the library to ensure a smooth transition.
💻 commits |
If you need further assistance, feel free to reach out to me by email at @likashefi.
The library is licensed under the MIT License.
No vulnerabilities found.
No security vulnerabilities found.