0.1.0 • Published 4 years ago

react-native-bigimageviewer v0.1.0

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

react-native-bigimageviewer

react native Big image viewer supporting pan and zoom, with very little memory usage and full featured image loading choices. Powered by Glide

Installation

yarn add react-native-bigimageviewer
allprojects {
    repositories {
       maven {
         url  "http://dl.bintray.com/piasy/maven"
       }
       ...
    }
}

Note: please put this download url at the first of your repositories part, otherwise, gradle may search in wrong place.

example

Usage

import BannerView from 'react-native-bigimageviewer';
// ...

<BannerView
        {...imageProps}
        style={styles.image}
        source={
          'https://4youscan.xyz/wp-content/uploads/2020/08/005-2537-900x1280.jpg'
        }
        resizeMode={'fitCenter'}
        loading={true}

/>

props

type resizeMode =
  | 'center'
  | 'centerCrop'
  | 'centerInside'
  | 'fitCenter'
  | 'fitEnd'
  | 'fitStart'
  | 'fitXY'
  | 'start';

interface imageProps {
  source: string;
  loading?: boolean;
  resizeMode?: resizeMode;
  style?: StyleProp<ImageStyle>;
  onCacheHit?: Function;
  onCacheMiss?: Function;
  onStart?: Function;
  onProgress?: Function;
  onFinish?: Function;
  onSuccess?: Function;
  onFail?: Function;
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT