A React lightbox that supports videos, images and pinch zooming on images. Optimized for mobile UI with swiping, but can be used on desktop as well. This is only a slight repackage of the original, adding custom dimensions for video sizing.

Usage no npm install needed!

<script type="module">
  import reactImageLightboxDimensions from '';


React image & video lightbox

Demo can be found here. It is best viewed on a mobile browser.


npm install react-image-video-lightbox


            { url: '', type: 'photo', altTag: 'some image' },
            { url: '', type: 'video', altTag: 'some video' },
            { url: '', type: 'photo', altTag: 'some other image' },
            { url: '', type: 'video', altTag: 'some other video' }
        onCloseCallback={this.callbackFunction} />


Property Type Description
data Array of resources an array of resource objects (see resource object below)
startIndex number index of image/video where the lightbox should open
showResourceCount boolean show resource count in left upper corner
onCloseCallback Function => void callback function called when the lightbox is closed

Resource Object

Property Type Description
url string url of the image/video
type string only two types are supported at this stage - images & videos (Youtube videos are recommended)
altTag string alt tag for image/video

More properties to follow...

Want to contribute?

Fork repo, submit pull request.

Have a feature request or improvement suggestion?

Create an issue on Github at: