Image Magnifier JavaScript (Typescript) | Image Zoom on Hover using | Image Hover Effect
npm install simple-image-magnifierThis package allows your customers to zoom in on your product images with ease, giving them a closer look at the details that matter most. Whether it's the intricate stitching on a piece of clothing, the texture of a material, or the fine print on a label, Image Magnifier React makes it all visible with clarity and precision.
  
``bash`
npm i simple-image-magnifier
For ReactJS
`js
import ReactImageMagnifier from 'simple-image-magnifier/react'
import imagePreview from './assets/image-preview.jpg'
import imageOriginal from './assets/image-original.jpg'
...
srcOriginal={imageOriginal}
width={400}
height={600}
className='max-w-xs bg-gray-200 rounded-lg md:max-w-none max-h-80 md:max-h-none'
objectFit='contain'
/>
`
- srcPreview and srcOriginal is required fieldswidth
- and height is optionally, by default 100%className
- is optionallyobjectFit
- is optionally, by default cover
For HTML+JS
``js
...


...
`
- the first parameter is sellector` as string or Element of the wrapper div for the images.
- the second parameter same as the first parameter but for the preview image.
- same but for the original image.