Gathering detailed insights and metrics for react-native-image-pan-zoom
Gathering detailed insights and metrics for react-native-image-pan-zoom
Gathering detailed insights and metrics for react-native-image-pan-zoom
Gathering detailed insights and metrics for react-native-image-pan-zoom
@likashefqet/react-native-image-zoom
A performant zoomable image written in Reanimated v2+ 🚀
react-native-zoom-toolkit
Most complete set of pinch to zoom utilites for React Native
@react-native-oh-tpl/react-native-image-pan-zoom
react native image pan zoom
react-native-image-zoom-fixed
react native image pan zoom
npm install react-native-image-pan-zoom
Typescript
Module System
Node Version
NPM Version
TypeScript (95.26%)
JavaScript (4.74%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
642 Stars
198 Commits
281 Forks
13 Watchers
24 Branches
20 Contributors
Updated on May 20, 2025
Latest Version
2.1.12
Package Id
react-native-image-pan-zoom@2.1.12
Size
23.91 kB
NPM Version
6.14.4
Node Version
12.16.3
Published on
May 19, 2020
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
Zoom while sliding
Intelligent zoom
1npm i react-native-image-pan-zoom --save
1$ npm install -g create-react-native-app
1$ create-react-native-app AwesomeProject
AwesomeProject/App.js
, like this:1import { Image, Dimensions } from 'react-native'; 2import ImageZoom from 'react-native-image-pan-zoom'; 3 4export default class App extends React.Component { 5 render: function() { 6 return ( 7 <ImageZoom cropWidth={Dimensions.get('window').width} 8 cropHeight={Dimensions.get('window').height} 9 imageWidth={200} 10 imageHeight={200}> 11 <Image style={{width:200, height:200}} 12 source={{uri:'http://v1.qzone.cc/avatar/201407/07/00/24/53b9782c444ca987.jpg!200x200.jpg'}}/> 13 </ImageZoom> 14 ) 15 } 16}
Props | Type | Description | DefaultValue |
---|---|---|---|
cropWidth(required) | number | operating area width | 100 |
cropHeight(required) | number | operating area height | 100 |
imageWidth(required) | number | picture width | 100 |
imageHeight(required) | number | picture height | 100 |
onClick | (eventParams: IOnClick)=>void | onClick | ()=>{} |
onDoubleClick | (eventParams: IOnClick)=>void | onDoubleClick | ()=>{} |
panToMove | boolean | allow to move picture with one finger | true |
pinchToZoom | boolean | allow scale with two fingers | true |
clickDistance | number | how many finger movement can also trigger onClick | 10 |
horizontalOuterRangeOffset | (offsetX?: number)=>void | horizontal beyond the distance, the parent to do picture switching, you can listen to this function. When this function is triggered, you can do the switch operation | ()=>{} |
onDragLeft | ()=>void | trigger to switch to the left of the graph, the left sliding speed exceeds the threshold when triggered | ()=>{} |
responderRelease | (vx: number)=>void | let go but do not cancel | ()=>{} |
maxOverflow | number | maximum sliding threshold | 100 |
longPressTime | number | long press threshold | 800 |
onLongPress | (eventParams: IOnClick)=>void | on longPress | ()=> {} |
doubleClickInterval | number | time allocated for second click to be considered as doublClick event | 175 |
onMove | ( position: IOnMove )=>void | reports movement position data (helpful to build overlays) | ()=> {} |
centerOn | { x: number, y: number, scale: number, duration: number } | if given this will cause the map to pan and zoom to the desired location | undefined |
enableSwipeDown | boolean | for enabling vertical movement if user doesn't want it | false |
enableCenterFocus | boolean | for disabling focus on image center if user doesn't want it | true |
onSwipeDown | () => void | function that fires when user swipes down | null |
swipeDownThreshold | number | threshold for firing swipe down function | 230 |
minScale | number | minimum zoom scale | 0.6 |
maxScale | number | maximum zoom scale | 10 |
useNativeDriver | boolean | Whether to animate using useNativeDriver | false |
onStartShouldSetPanResponder | () => boolean | Override onStartShouldSetPanResponder behavior | () => true |
onMoveShouldSetPanResponder | () => boolean | Override onMoveShouldSetPanResponder behavior | undefined |
onPanResponderTerminationRequest | () => boolean | Override onMoveShouldSetPanResponder behavior | () => false |
useHardwareTextureAndroid | boolean | for disabling rendering to hardware texture on Android | true |
Method | params | Description |
---|---|---|
reset | Reset the position and the scale of the image | |
resetScale | Reset the scale of the image | |
centerOn | ICenterOn | Centers the image in the position indicated. ICenterOn={ x: number, y: number, scale: number, duration: number } |
After clone this repo, then:
1npm install 2npm start
1cd demo 2npm install 3npm start
Then, scan the QR, use your expo app.
Thanks goes to these wonderful people (emoji key):
Darius ???? | Thomas P. ???? | Juan Di Toro ???? | Alhaytham Elhassan ???? | Alexander Pataridze ???? | Peter Xu ???? |
This project follows the all-contributors specification. Contributions of any kind welcome!
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/3 approved changesets -- score normalized to 0
Reason
project is archived
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
69 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More