Skip to content

khalisafkari/react-native-bigimageviewer

Repository files navigation

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
// android/build.gradle

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.

demo

1 2 3

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

About

react native Big image viewer supporting pan and zoom

Topics

Resources

License

Stars

Watchers

Forks