@didik-mulyadi/react-modal-images
v1.0.2
Published
Lightweight Lightbox React Component
Downloads
135
Maintainers
Readme
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