react-native-pinchable
v0.2.1
Published
Pinch to zoom for React Native
Downloads
12,279
Maintainers
Readme
react-native-pinchable
Instagram like pinch to zoom for React Native.
Installation
# Add dependency
yarn add react-native-pinchable
# Link iOS dependency
pod install --project-directory=ios
# Compile project
react-native run-ios # or run-android
Usage
import Pinchable from 'react-native-pinchable';
<Pinchable>
<Image source={...}>
</Pinchable>
Properties
| Prop | Description | Default |
| ---------------------- | ------------------------------- | ------- |
| minimumZoomScale
| The minimum allowed zoom scale. | 1
|
| maximumZoomScale
| The maximum allowed zoom scale. | 3
|
Limitations
On Android it's not possible to receive touch events on the views inside the Pinchable
component.
Demo
See Example
folder.
License
MIT License. © Joel Arvidsson 2019 - present