1.0.2 • Published 2 years ago

react-native-pinch-view v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Demo

screencast

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

PropDescriptionDefault
minScaleThe minimum allowed scale.1
maxScaleThe maximum allowed scale.Infinity

License

MIT License. © Pavlo Huk 2022 - present