
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
react-native-zoom-image
Advanced tools
ZoomImage component for React Native Application (ios / android)
Only works with https network images [With the limitation of the current react-native, we can't get original size of required images. This component just zooms them with given size (provided by
imgStyle
prop)]
If you need to support http network images, modify info.plist please :)
install from npm
npm install --save react-native-zoom-image
import in project
import ZoomImage from 'react-native-zoom-image';
import {Easing} from 'react-native'; // import Easing if you want to customize easing function
let styles = {
img: {} // custom styles of original image component
};
// in render function
<ZoomImage
source={{uri: 'https://ooo.0o0.ooo/2017/03/31/58de0e9b287f6.jpg'}}
imgStyle={{width: 250, height: 230}}
style={styles.img}
duration={200}
enableScaling={false}
easingFunc={Easing.ease}
/>
Prop | Type | Default | Description |
---|---|---|---|
disabled | bool | false | Whether to disable the component or not. |
startCapture | bool | false | Whether to capture start touch event or not. |
moveCapture | bool | false | Whether to capture move event or not. |
responderNegotiate | function | - | Use custom conditions to enable or disable gesture over image modal. |
easingFunc | function | Easing.linear | The easing function of animation. |
showDuration | number | 100 | The duration of showing the image modal. |
closeDuration | number | 140 | The duration of closing the image modal. |
rebounceDuration | number | 800 | The total duration of resetting the position of image. The actual duration changes by the displacement of the image in Y-axis. If the displacement equals to the height of screen, the duration shall be 800ms. |
enableScaling | bool | false | Whether to scale the image when it is polled. |
Method | Params | Description |
---|---|---|
openModal | - | Open image modal |
closeModal | - | Close image modal. |
LICENSE MIT
FAQs
Image view component for react-native, like Twitter.
The npm package react-native-zoom-image receives a total of 114 weekly downloads. As such, react-native-zoom-image popularity was classified as not popular.
We found that react-native-zoom-image demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.