npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

image-zoom-npm

v0.1.1

Published

Lightweight React component that opens images in a zoomed modal when clicked.

Readme

image-zoom-npm

Lightweight React component that opens any image in a fullscreen zoom overlay when clicked, then closes on outside click, close button, or Escape.

Installation

npm install image-zoom-npm
# or
yarn add image-zoom-npm

Quick Start

import { ImageZoom } from 'image-zoom-npm';

export function GalleryCard() {
  return (
    <ImageZoom
      src="/images/thumb.jpg"
      zoomSrc="/images/full.jpg"
      alt="Sample artwork"
    />
  );
}

Component Props

| Prop | Type | Default | Description | | --- | --- | --- | --- | | src | string | – | Required thumbnail image source (inherited from img). | | zoomSrc | string | src | High-resolution image shown inside the overlay. | | alt | string | '' | Alt text for the base image. | | zoomAlt | string | alt | Alt text for the zoomed image/dialog label. | | overlayBackground | string | rgba(0, 0, 0, 0.85) | CSS color for the overlay backdrop. | | overlayClassName | string | – | Custom class for the overlay container. | | zoomImageClassName | string | – | Custom class for the zoomed <img>. | | closeButtonClassName | string | – | Custom class for the close button. | | closeOnOutsideClick | boolean | true | Close when clicking the backdrop. | | closeOnEsc | boolean | true | Close when pressing Escape. | | closeLabel | string | Close image | Accessible label for the close button. | | closeButtonContent | ReactNode | '×' | Custom content for the close button. | | ...imgProps | ImgHTMLAttributes | – | All other native <img> props (width, height, etc.). |

Styling Tips

  • Override look-and-feel with the provided class name props.
  • Use inline styles via style or wrap the component in your layout system.
  • The overlay locks body scroll while open; ensure there are no layout shifts by keeping overall page height consistent.

Accessibility

  • The overlay renders with role="dialog" and aria-modal="true".
  • Set zoomAlt (or alt) to describe the zoomed content.
  • Customize closeLabel for localized strings.

Development

npm install
npm run dev   # watch mode with tsup
npm run build # emit dist/ for publishing

License

MIT © 2025