react-native-pinch-view
v1.0.2
Published
Pinch view component
Downloads
15
Readme
Demo
See Example
folder.
Installation
# yarn
yarn add react-native-pinch-view
# npm
npm i react-native-pinch-view
Usage
First, you will need to add PinchViewProvider
to your root component.
import { PinchViewProvider } from 'react-native-pinch-view';
export const App = () => (
<PinchViewProvider>
{... your app goes here}
</PinchViewProvider>
);
Last, you wrap the content that you want to pinch with PinchView
.
import { PinchView } from 'react-native-pinch-view';
<PinchView>
<Image source={...}>
</PinchView>
Properties
| Prop | Description | Default |
| ---------------------- | ------------------------------- | ------- |
| minScale
| The minimum allowed scale. | 1
|
| maxScale
| The maximum allowed scale. | Infinity
|
License
MIT License. © Pavlo Huk 2022 - present