@didik-mulyadi/react-modal-images
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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

Package Sidebar

Install

npm i @didik-mulyadi/react-modal-images

Weekly Downloads

3

Version

1.0.2

License

MIT

Unpacked Size

255 kB

Total Files

35

Last publish

Collaborators

  • didikmulyadi