
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
react-looking-glass
Advanced tools
A react component for magnifying images with a magnifying/looking glass effect
A React component for magnifying images using a magnifying/looking glass effect.
React Looking Glass offers some advantages over other similar components:
You can view detailed usage examples at the Storybook, or a simple example on CodeSandbox.
Install the package using NPM:
npm install react-looking-glass
Use the component:
import LookingGlass from "react-looking-glass";
import image from "./path";
<LookingGlass src={image} zoomFactor={4} />
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
| src | String | x | The source of the primary image | |
| zoomFactor | Number | 3 | x | The amount to zoom the image by |
| size | Number | 200 | The size of the width and height of the magnifier in pixels | |
| cursorOffset | Object | { x: 0, y: 0 } | The offset of the magnifier from the cursor | |
| zoomSrc | String | An optional higher resolution photo for the magnifier | ||
| displayZoomOne | Boolean | false | Will show the magnifier when zoomFactor is equal to 1 | |
| scrollLinked | Boolean | true | Will update the magnifier when the container scrolls, but this might break on some browsers | |
| squareMagnifier | Boolean | false | If true, will display the magnifier as a square instead of a circle | |
| className | String | The name of the class for the image holder (the root of the component) | ||
| imageClassName | String | The name of the class for the image itself (only applies to the primary image) | ||
| zoomClassName | String | The name of the class for the magnifying glass | ||
| hideCursor | Boolean | The name of the class for the magnifying glass |
FAQs
A react component for magnifying images with a magnifying/looking glass effect
We found that react-looking-glass demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.