React component for image displaying in full screen

Apr 04, 2020
React component for image displaying in full screen

React Image Viewer

A mobile friendly images slideshow react component.


View Demo View Github


  • 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]](/cdn-cgi/l/email-protection)^16.3.0, [[email protected]](/cdn-cgi/l/email-protection)^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'));


addonfuncDisplay extra content of the image (addon must return a react node)
showPageButtonboolfalseDisplay page buttons
imagesarrayyesImage urls to display
isOpenboolfalseWhether the component is open
indexnumber0Index of the first image to display
loadingIconfunc | nodeThe component displayed when the image is loading
noTapCloseboolfalseIf true, the close event will not be triggered by single tap.
onClosefuncCallback fired when the component closes
onChangefuncCallback fired when the index changes