React Native Pinch View
Instagram like pinch to zoom for React Native.
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