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

@russellbits/panelize

v1.0.0

Published

Vanilla JS ES module for navigating web comics, presentations, or any large image using HTML image maps with pan and zoom animations

Readme

Panelize

Navigation for images based on HTML image maps

Panelize is a vanilla JS ES module for navigating web comics, presentations, or any large image using HTML image maps. It pans and zooms to each mapped area using CSS transform animation — no jQuery, no dependencies.

Usage

Include the script as an ES module:

<script type="module" src="panelize.js"></script>

Wrap your image in a container div with data-panelize. The <map> must be inside the container:

<div data-panelize style="width: 800px; height: 600px;">
  <img src="yourImage.jpg" usemap="#panels" />
  <map name="panels">
    <area coords="0,0,400,300" />
    <area coords="400,0,800,300" />
    <area coords="0,300,800,600" />
  </map>
</div>

<button id="nextPanelBtn">Next</button>
<button id="prevPanelBtn">Previous</button>

That's it — no JavaScript required for basic use.

Settings

Configure with data-* attributes on the container:

| Attribute | Default | Description | |---|---|---| | data-full-image-start | "true" | Show full scaled image first; "false" to start at first panel | | data-next-btn | "#nextPanelBtn" | CSS selector for the Next button | | data-prev-btn | "#prevPanelBtn" | CSS selector for the Prev button |

Programmatic API

import { Panelize } from './panelize.js';

const p = new Panelize(document.querySelector('#myViewer'), {
  fullImageStart: true,
  nextBtn: '#myNextBtn',
  prevBtn: '#myPrevBtn'
});

Panel Overlay (debug tool)

paneloverlay.js draws colored boxes over all image map areas for visual debugging. No JavaScript required — any element with data-panel-overlay is initialized automatically on DOMContentLoaded.

<script type="module" src="paneloverlay.js"></script>

<div data-panel-overlay style="position: relative; display: inline-block;">
  <img src="yourImage.jpg" usemap="#panels" />
  <map name="panels">
    <area coords="0,0,400,300" />
  </map>
</div>

Add CSS for the overlay boxes (the module does not inject these — you must provide them):

.panel {
  position: absolute;
  border: 2px solid rgba(255, 0, 0, 0.5);
  background: rgba(255, 0, 0, 0.1);
  box-sizing: border-box;
}
.panelHighlight {
  background: rgba(255, 0, 0, 0.35);
}

Notes

  • The <map> element must be inside the data-panelize or data-panel-overlay container.
  • The container should have an explicit width and height set.
  • paneloverlay.js requires the container to have position: relative.
  • Areas with a target attribute are skipped by Panelize (they are treated as links, not panels).

License

© R. E. Warner. Released under the MIT License.