react-native-pinch-view
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

React Native Pinch View

Instagram like pinch to zoom for React Native.

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

Prop Description Default
minScale The minimum allowed scale. 1
maxScale The maximum allowed scale. Infinity

License

MIT License. © Pavlo Huk 2022 - present

Dependents (0)

Package Sidebar

Install

npm i react-native-pinch-view

Weekly Downloads

46

Version

1.0.2

License

MIT

Unpacked Size

54.5 kB

Total Files

27

Last publish

Collaborators

  • hukpo