You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

react-native-image-zoom-viewer

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-image-zoom-viewer

react native image viewer,大图浏览

2.0.17
Source
npm
Version published
Weekly downloads
36K
-12.77%
Maintainers
1
Weekly downloads
 
Created
Source

Show Cases

Swiper image

1.gif

Zoom while sliding

2.gif

Getting Started

Installation

npm i react-native-image-zoom-viewer --save

Basic Usage

  • Install create-react-native-app first
$ npm install -g create-react-native-app
  • Initialization of a react-native project
$ create-react-native-app AwesomeProject
  • Then, edit AwesomeProject/App.js, like this:
import { Modal } from 'react-native';
import ImageViewer from 'react-native-image-zoom-viewer';

const images = [{
    url: 'https://avatars2.githubusercontent.com/u/7970947?v=3&s=460'
}, {
    url: 'https://avatars2.githubusercontent.com/u/7970947?v=3&s=460'
}, {
    url: 'https://avatars2.githubusercontent.com/u/7970947?v=3&s=460'
}]

export default class App extends React.Component {
    render: function() {
        return (
            <Modal visible={true} transparent={true}>
                <ImageViewer imageUrls={images}/>
            </Modal>
        )
    }
}

Document

image

Development pattern

Step 1, run TS listener

After clone this repo, then:

npm install
npm start

Step 2, run demo

cd demo
npm install
npm start

Then, scan the QR, use your expo app.

Dependence

Depend on react-native-image-pan-zoom: https://github.com/ascoders/react-native-image-zoom

Keywords

image-viewer

FAQs

Package last updated on 24 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts