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

@fasteroid/panzoom-revamped

v11.0.0

Published

Extensible, mobile friendly pan and zoom framework.

Readme

@fasteroid/panzoom-revamped

based on anvaka's panzoom

Actually extensible, mobile-friendly pan & zoom framework. Now with 20% less jank!

Usage Example

<style>
    .flexbox-centerer {
        box-sizing: border-box;
        overflow: hidden;

        display: flex;
        align-items: center;
        justify-content: center;
    }
</style>

<div class="flexbox-centerer">
    <img id="cat" src="https://cataas.com/cat">
</div>

<script type="module">
    import { Panzoom } from "../dist/index.js"; // or however else you'd import in your environment
    let pz = new Panzoom( document.getElementById("cat") );
</script>

But what if..?

Is this the right one for me?
  • Yes, this is one of the *good* libraries like anvaka's that factor touch and cursor locations into zooming.

  • It'll probably work in your favorite framework out-of-the-box since it uses ✨ no dependencies! Just make sure to call pz.dispose() when you're done with one if being used with a framework!

  • It also offers kinetic behavior (on by default) to mimic the smooth scrolling mobile devices tend to implement. If the default is too slidey for you, pz.kinetic.friction can be changed to fit your needs.

  • If you need to know when the panzoom updates its transform, pz.onTransformChanged(callback) allows you to attach event handlers. This method returns an Unsubscribable, which you can call .unsubscribe() on to remove the event handler.

  • Unlike anvaka's library, transforms here are designed to best fit a centered element inside the panzoom's container. This may or may not make the math easier when doing external calculations (but it did for me!)

Limitations...

Stuff I can't fix because browsers suck
  • Currently, any descendant of a panzoom that creates a new stacking context is prone to polluting the entire panzoom with low-quality zooming.  This happens consistently on iOS Safari and its derivatives, and due to their implementation, even scrollable elements inside the panzoom will trigger this bug.

License

MIT License