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

pixel-perfect-overlay

v1.0.2

Published

A customizable pixel-perfect overlay with adjustable offset and opacity

Readme

Pixel Perfect Overlay

pixel-perfect-overlay is a script for adding an image overlay with adjustable offset, opacity, and image upload functionality via URL or drag-and-drop. It's easy to integrate into projects and is perfect for development with visual testing capabilities.

Installation

To install the package in your project, run the following command:

npm install pixel-perfect-overlay --save-dev

Or using yarn:

yarn add pixel-perfect-overlay --dev

Usage

After installation, simply import the script into your project. Add the following import to your main JavaScript file:

import 'pixel-perfect-overlay';

This will load the script, and it will start working automatically without the need for additional initialization. The package will create a control panel for configuring the image overlay and manage all functionality (offset, opacity, image upload).

Main Features

  1. Image Upload:

    • You can upload an image via URL or using drag-and-drop (file dragging).
    • URL Image: Change the image URL using the input field in the control panel.
    • Drag-and-Drop: Just drag and drop an image file into the browser window, and it will automatically load as the overlay.
  2. Adjust Offset:

    • The overlay can be moved using the arrow keys on the keyboard:
      • Arrow Left and Arrow Right adjust the position along the X-axis.
      • Arrow Up and Arrow Down adjust the position along the Y-axis.
      • Use Shift + Arrow to move the overlay by 10 pixels instead of 1 pixel.
  3. Opacity Control:

    • The overlay's opacity can be adjusted via a slider in the control panel.
  4. Control Panel:

    • The control panel appears by clicking the settings button and allows you to configure:
      • Image URL.
      • Overlay opacity.
      • Overlay offset (X and Y axes).
  5. Saving Settings:

    • All changes are saved to localStorage. This allows settings such as offset, opacity, and image to persist across page reloads.
  6. Show/Hide Overlay:

    • The overlay can be toggled on and off using a button in the control panel.

Available Methods

  • No Initialization Required: The package starts working automatically as soon as it is imported, so you don’t need to initialize anything or pass any initial values. All settings can be changed through the control panel interface.

Notes

  • This package is intended for use in development builds. It is useful for visual testing and working with image overlays.
  • To upload an image using drag-and-drop, simply drag the image file into the browser window. The package will automatically detect the image and load it as the overlay.
  • The package uses localStorage to save the state, so settings such as image position and opacity will be retained between sessions.

License

This project is licensed under the MIT License.