react-image-zoom-on-hover
A simple React component for zooming images.
Installation
npm install react-image-zoom-on-hover
Basic usage
The component has only one required props: the link to the image.
Usage
import React from 'react';
import { ZoomImage } from 'react-image-zoom-on-hover';
const App = () => {
return (
<div>
<ZoomImage imageUrl="https://example.com/path/to/image.jpg" />
</div>
);
};
export default App;
Props
Examples
<ZoomImage imageUrl="https://example.com/path/to/image.jpg" />
<ZoomImage imageUrl="https://example.com/path/to/image.jpg" imageZoomPosition="left" />
Note
If the imageZoomPosition props is provided, it must have a valid value ("right" or "left"). Not providing this props or providing an invalid value may result in errors or unexpected behavior.