Skip to content

pkmoran/simple-react-lightbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Simple React Lightbox

A very simple image lightbox react component

Example usage

  <Lightbox
    isOpen={imageLightboxOpen}
    images={
      [
        { src: '<some-valid-img-src>' }
      ]
    }
    onClose={this.closeImages}
  />

Options

Prop Type Required Description
isOpen bool yes Whether or not the lightbox is open
images array yes Array of image objects for the lightbox. Objects must have a src property that is a valid src for an <img> tag. All other properties are ignored for now.
onClose func yes Callback to close the lightbox. Fires when the close button is clicked or the Escape key is pressed.

About

A very simple image lightbox react component

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published