Skip to content

ssomnoremac/react-image-zoom

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-image-zoom

##Overview

React component for desktop browsers for image zoom on mouse hover.

##Demo

Demo

##Install

npm install react-image-zoom --save

##Usage

import React from 'react';
import ReactDOM from 'react-dom';
import ReactImageZoom from 'react-image-zoom';

const props = {width: 400, height: 250, zoomWidth: 500, img: "1.jpg"};
ReactDOM.render(<ReactImageZoom {...props} />, document.getElementById('react-app'));

##propTypes

  • width (number) - width of the source image
  • height (number) - height of the source image
  • zoomWidth (number) - width of the zoomed image. Zoomed image height equals source image height
  • img (string) - url of the source image

##RouteMap

  • offset property - offset in pixels between original image and zoomed image

  • add scale property

About

React component for desktop browsers for image zoom on mouse hover

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.3%
  • HTML 3.7%