JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 324
  • Score
    100M100P100Q91563F
  • License MIT

Image Magnifier JavaScript (Typescript) | Image Zoom on Hover using | Image Hover Effect

Package Exports

  • simple-image-magnifier
  • simple-image-magnifier/react

Readme

Simple Image Magnifier + React + TypeScript

This 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.

npm version MIT license npm downloads

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
<ReactImageMagnifier
    width={400}
    height={600}
    srcPreview={previews[imgActive]}
    srcOriginal={originals[imgActive]}
    className='max-w-xs bg-gray-200 rounded-lg md:max-w-none max-h-80 md:max-h-none'
/>
  • Replace plugin:@typescript-eslint/recommended to plugin:@typescript-eslint/recommended-type-checked or plugin:@typescript-eslint/strict-type-checked
  • Optionally add plugin:@typescript-eslint/stylistic-type-checked
  • Install eslint-plugin-react and add plugin:react/recommended & plugin:react/jsx-runtime to the extends list