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

gimli-mouse-tracker

v1.0.2

Published

A physics-based mouse tracking Web Component.

Readme

Gimli Mouse Tracker

A single-file, no-dependency Web Component that tracks the user's mouse movements with tunable physics parameters (tension and friction) and sets the result as CSS custom properties.

Installation

npm install gimli-mouse-tracker

Documentation

The mouse-tracker is a zero-dependency Web Component that monitors mouse movement within its bounds and maps those coordinates to CSS Custom Properties (CSS variables) using a spring-physics engine for smooth, organic motion.

Demos

Attributes

Physics Configuration

These attributes control the "feel" of the animation. They apply globally to all tracked variables within the component.

| Attribute | Default | Description | | -------- | ------- | ------- | | friction | 0.3 | Resistance. Controls how much the movement resists. Lower values result in more "bounciness" or overshoot; higher values make the movement stiffer. | | tension | 0.1 | Spring Strength. Controls how strongly the value pulls toward the target. Higher values make the animation faster and snappier. |

Tracking Attributes

The values of these attributes must be the CSS variable name (e.g., --my-coord) you wish to control.

Pixel-Based Tracking

These track the mouse position in absolute pixels relative to the top-left corner of the element.

| Attribute | Description | | -------- | ------- | | mouse-x | Maps the horizontal pixel position to a CSS variable. | | mouse-y | Maps the vertical pixel position to a CSS variable. |

Percentage-Based Tracking

These track the mouse position as a percentage (0 to 100) of the element's total width and height.

| Attribute | Description | | -------- | ------- | | mouse-x-percentage | Maps horizontal progress (0-100%) to a CSS variable. | | mouse-y-percentage | Maps vertical progress (0-100%) to a CSS variable. |

Offset Adjustments

Offsets allow you to shift the coordinate system. These are useful for centering an element on the cursor (e.g., setting a percentage offset of 50 to make the center of the element the origin).

| Attribute | Description | | -------- | ------- | | offset-x | Subtracted from the mouse-x value. | | offset-y | Subtracted from the mouse-y value. | | offset-x-percentage | Subtracted from the mouse-x-percentage value. | | offset-y-percentage | Subtracted from the mouse-y-percentage value. |

Technical Behavior

  • Initial Values: When the component initializes, it looks for an existing value of the CSS variable on the document root or the component itself to use as the starting point.
  • Mouse Leave: When the mouse leaves the element's area, all tracked variables will automatically animate back to their initial starting values.