React Image Viewer

A mobile friendly images slideshow react component.



  • Close to the native experience(powered by Alloyfinger)
  • Pinch to zoom in/out
  • No unnecessary rendering( the component only renders no more than 3 images at a time)
  • Support touch and mouse events both

Get Started

  1. Run yarn add react-imageslides react react-dom
    The package has peer dependencies on [email protected]^16.3.0, [email protected]^16.3.0, and alloyfinger.

  2. Render it!

import React from 'react';
import ReactDOM from 'react-dom';
import ImageSlides from 'react-imageslides';
const images = [
ReactDOM.render(<ImageSlides images={images} isOpen />, document.getElementById('root'));


Property Type Default Required Description
addon func Display extra content of the image (addon must return a react node)
showPageButton bool false Display page buttons
images array yes Image urls to display
isOpen bool false Whether the component is open
index number 0 Index of the first image to display
loadingIcon func | node The component displayed when the image is loading
noTapClose bool false If true, the close event will not be triggered by single tap.
onClose func Callback fired when the component closes
onChange func Callback fired when the index changes