react-native-image-fit

0.9.10 • Public • Published

react-native-image-fit

ImageViewer component for RN

Installation

$ npm install --save react-native-image-fit

or

$ yarn add react-native-image-fit

Usage

import { ImageViewer } from 'react-native-image-fit';
 
export const App = () => (
  <ImageViewer
    disabled={false} // by default
    source={require('./photo.png')} // or { url: 'https://...' }
    doubleTapEnabled={true} // by default double tap will zoom image
    onMove={(e, gestureState) => null}
    onPress={(opening) => console.log(opening)}
    mainImageStyle={styles.someStyle}
    zoomedImageStyle={styles.zoomedImageStyle}
    mainImageProps={{
        resizeMode: 'contain'
    }}
    zoomedImageProps={{
        resizeMode: 'contain'
    }}
  />
)

ImageViewer Component example

ezgif-3352117320

/react-native-image-fit/

    Package Sidebar

    Install

    npm i react-native-image-fit

    Weekly Downloads

    4

    Version

    0.9.10

    License

    MIT

    Last publish

    Collaborators

    • shahen