Skip to content

easychen/react-image-modal

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-image-modal

npm package

A lightweight React component providing modal image Lightbox.

Features

  • Only 3 kB when gzipped.
  • Zero dependencies.
  • For React 16.x and 17.x.
  • Esc, Enter & click outside the image close the lightbox
  • User can zoom & move the image or download the highest quality one
  • Download and Zoom -buttons can be hidden.
  • Image alt shown as title of lightbox

Simple API

import ModalImage from "react-image-modal";

<ModalImage
  showDownload={true}
  showRotation={true}
  showZoom={true}
  src="image"
  alt="cat image!"
  className="string"
/>;

About

react modal for images

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 90.7%
  • CSS 9.3%