rc-image-previewer

1.7.1 • Public • Published

ImagePreviewer Build Statusnpmlicense

image-previewer-demo

Demo gif here if not loaded.

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 (
      <View style={{
        flex: 1,
        backgroundColor: '#fff',
        alignItems: 'center',
        justifyContent: 'center',
      }}>
        <ImagePreviewer
          source={MountHuang}
          style={{
            width: ImgWidth,
            height: ImgHeight,
          }}
          resizeMode="stretch"
        />
      </View>
    );
  }
}

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)

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.7.12latest

Version History

VersionDownloads (Last 7 Days)Published
1.7.12
1.7.00
1.6.00
1.5.10
1.5.00
1.4.00
1.3.10
1.3.00
1.2.10
1.2.00
1.1.10
1.1.00
1.0.30
1.0.20
1.0.10
1.0.00
0.1.00

Package Sidebar

Install

npm i rc-image-previewer

Weekly Downloads

2

Version

1.7.1

License

MIT

Unpacked Size

226 kB

Total Files

9

Last publish

Collaborators

  • faichou