Skip to content

didikmulyadi/react-modal-images

 
 

Repository files navigation

React Modal Images⚡️

A _lightweight_ React component providing modal image Lightbox without dependency

npm latest version npm bundle size Visitors count NPM license


Bug report · Feature request



This package is created under https://github.com/aautio/react-modal-images because that repository is not active and updated. This package is also fixed some issue from that repository.

Original Features

  • Only 3 kB when gzipped.
  • Zero dependencies.
  • Includes builds for CommonJS and ES modules.
  • For React 16.x, 17.x and 18.x.
  • Esc and Enter the image to close the lightbox
  • User can zoom & move the image or download the highest quality one
  • Download and Zoom -buttons can be hidden.
  • Image alt is shown as the title of the lightbox
  • The background color of transparent images can be overridden.

You must bring your own Set and fetch polyfills if you use old Internet Explorers.

New Features

  • Typescript
  • Support multiple images with action (prev and next)
  • Add onClose in props type
  • Issue cors when downloading the image
  • Add on download
  • Custom file name when downloading the image
  • Support props lightboxClassName in the Lightbox component
  • Disable close-by OnClick
  • Control max width by Props

TODO

  • Beautify the Github Pages
  • Add more docs in the github pages
  • Add more docs the readme
  • Deploy to the NPM Registry

About

A tiny React component providing modal image Lightbox with support multiple images and slider.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 83.3%
  • JavaScript 16.7%