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 !
- Host: GitHub
- URL: https://github.com/faichou/imagepreviewer
- Owner: FaiChou
- Created: 2018-05-02T01:18:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-28T12:30:27.000Z (over 2 years ago)
- Last Synced: 2025-03-16T16:58:20.720Z (7 months ago)
- Topics: imageviewer, react-native
- Language: JavaScript
- Size: 641 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## ImagePreviewer [](https://travis-ci.org/FaiChou/ImagePreviewer)[](https://www.npmjs.com/package/rc-image-previewer)

[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)