An open API service indexing awesome lists of open source software.

https://github.com/faichou/imagepreviewer

A react native image previewer !
https://github.com/faichou/imagepreviewer

imageviewer react-native

Last synced: 7 months ago
JSON representation

A react native image previewer !

Awesome Lists containing this project

README

          

## ImagePreviewer [![Build Status](https://travis-ci.org/FaiChou/ImagePreviewer.svg?branch=master)](https://travis-ci.org/FaiChou/ImagePreviewer)[![npm](https://img.shields.io/npm/v/npm.svg)](https://www.npmjs.com/package/rc-image-previewer)![license](https://img.shields.io/github/license/mashape/apistatus.svg)

![image-previewer-demo](https://raw.githubusercontent.com/FaiChou/faichou.github.io/master/img/qiniu/image-previewer-demo.gif)

[Demo gif here if not loaded.](https://raw.githubusercontent.com/FaiChou/faichou.github.io/master/img/qiniu/image-previewer-demo.gif)

### How to use

Install package:

```
npm install --save rc-image-previewer
```

Import to your app:

```
import ImagePreviewer from 'rc-image-previewer';
```

Use the component:

```
const { width } = Dimensions.get('window');

export default class App extends React.Component {
render() {
const ImgWidth = width;
const ImgHeight = ImgWidth * 0.6;
return (



);
}
}
```

### API

API table

API name | Usage
---------------|----------------------------------------
style | The style of element.
source | The image source, same as source.
resizeMode | The image resize mode, default is contain.(Optional)