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

gradient-cursor

v1.0.3

Published

A JavaScript library that applies a dynamic and customizable gradient cursor effect to enhance user interaction on web pages.

Readme

gradient-cursor NPM version License: MIT NPM total downloads

A JavaScript library that applies a dynamic gradient cursor effect to enhance user interaction on web pages.


🚀 Features

  • Dynamic Gradient Cursor: Apply a customizable gradient effect to the cursor.
  • Customizable Color: Easily modify the cursor's gradient color with simple parameters.
  • Customizable Size: Adjust the cursor's size with flexible size options (e.g., 12vmax).
  • Smooth Cursor Movement: The cursor position updates smoothly with mouse movements.
  • Easy Integration: Simple setup and usage for your web projects.

📦 Installation

You can install gradient-cursor using your favorite package manager:

# Using pnpm
pnpm add gradient-cursor

# Using npm
npm install gradient-cursor

# Using yarn
yarn add gradient-cursor

🌟 Usage

Here's how to use the library in your project:

Import the library

// CommonJS
const applyGradientCursor = require('gradient-cursor');

// ES Modules
import applyGradientCursor from 'gradient-cursor';

Basic example

applyGradientCursor({ backgroundColor: "#1c2742", gradientColor: "15, 23, 42", gradientSize: "12vmax" });

This will apply a dark blue background with a light gradient cursor with the specified sizer.

Result

https://github.com/user-attachments/assets/bd3692fe-e9fc-4047-a49e-d2e5c1b3363f


🔧 API

applyGradientCursor(options)

Applies the gradient cursor effect with the given options.

Parameters

  • options (object): Configuration object for the gradient cursor. The options include:
    • backgroundColor (string): [optional] The background color for the body of the page.
    • gradientColor (string): [optional] The gradient color for the cursor (in RGB format).
    • gradientSize (string): [optional] The size of the cursor (e.g., 12vmax).

Returns

  • void: This function doesn't return anything, it just applies the cursor effect.

🛠️ Development

If you want to contribute or use the project locally, follow these steps:

Clone the repository

git clone https://github.com/laura-benavente/gradient-cursor.git
cd gradient-cursor

Install dependencies

npm install

🧪 Testing

This project uses Jest for testing. To run the test suite, simply use:

npm run test

Example output:

PASS ./index.test.js
✓ should update the cursor position on mouse move
...

Feel free to add more test cases in the test file.

🔄 Changelog

See CHANGELOG.md for a detailed history of changes.


💡 Contributing

Contributions are welcome! If you'd like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Submit a pull request with a clear description of the changes.

See CONTRIBUTING.md for more details.


📜 License

This project is licensed under the MIT License. Created with ❤️ by Laura Benavente.


🌍 Links