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

second-finger

v0.1.0

Published

When users rage-click a button, the cursor switches to the backup finger.

Downloads

159

Readme

second-finger

npm version license demo

When users rage-click a button, the cursor switches to the backup finger.

Index finger's tired. Switching to backup…

Try the live demo → · View on npm · Source on GitHub

Rage-click demo: pointer emoji, broken button, backup finger

A tiny opt-in easter egg for broken buttons, slow submits, and loading spinners that never load. Rage-click 5 times within 0.8s (configurable) and the backup finger clocks in for a few seconds.

Install

npm install second-finger

Quick start

import { secondFinger } from "second-finger";

secondFinger("#submit");

Integration

1. HTML attribute (zero JS logic)

<button data-second-finger>Submit</button>

<script type="module">
  import "second-finger/auto";
</script>

2. One-liner (vanilla JS)

import { secondFinger } from "second-finger";

secondFinger("#submit");

Returns a cleanup function:

const stop = secondFinger(document.querySelector(".pay-btn")!);
stop();

3. React wrapper

"use client";

import { SecondFinger } from "second-finger/react";

export function PayButton() {
  return (
    <SecondFinger>
      <button type="button">Pay now</button>
    </SecondFinger>
  );
}

SecondFinger requires exactly one element child and forwards refs.

Pricing grid (mode: "always")

Swap the cursor on one tier only. No rage clicks required.

secondFinger("#pricing-free-tier", { mode: "always" });

Pricing grid: free tier gets the backup finger cursor

Next.js App Router

Mark the component file with "use client" and wrap the button. No Provider, no app shell changes.

Options

Both integrations accept optional overrides:

secondFinger("#submit", {
  mode: "rage",
  threshold: 7,
  windowMs: 1200,
  message: "First finger is on break. Backup deployed.",
  durationMs: 8000,
  popover: "cursor",
  onActivate: () => console.log("backup engaged"),
  onRestore: () => console.log("cursor restored"),
});

// Or swap the cursor on one element immediately, no clicks required
secondFinger("#pricing-free-tier", { mode: "always" });

| Option | Default | Description | | ------ | ------- | ----------- | | mode | "rage" | "rage" activates after rapid clicks; "always" swaps the cursor on the attached target only | | threshold | 5 | Clicks within the rage window before activation (mode: "rage" only) | | windowMs | 800 | Sliding window (ms). All threshold clicks must land within this span. Pause longer and the counter resets. | | message | "Index finger's tired. Switching to backup…" | Popover text shown on activation | | durationMs | 5000 | How long the backup cursor and popover stay active | | popover | "cursor" | "cursor" follows the pointer. "bottom" is reserved for a fixed bottom pill but is not implemented yet — it currently behaves like "cursor". | | onActivate | (none) | Called once when the backup finger activates (or immediately for mode: "always") | | onRestore | (none) | Called when the cursor and popover are restored (or when mode: "always" is detached) |

Experience config panel from the live demo

How fast do you have to click?

Only applies to mode: "rage". By default, 5 clicks within 800ms, roughly one click every 160ms. That's genuine rage-click speed, not a leisurely double-tap. The tracker uses a sliding window: if you pause for more than windowMs, earlier clicks drop off and you start over. Import RAGE_WINDOW_MS from the package if you want the constant in your app.

CDN

<button id="submit">Submit</button>
<script type="module">
  import { secondFinger } from "https://esm.sh/second-finger";
  secondFinger("#submit");
</script>

Behavior

mode: "rage" (default)

  • Counts rapid clicks on the attached element only. Default 5 clicks within 800ms
  • Shows a cursor-following popover on activation, but only while the backup finger cursor is active over a pointer target (buttons, links, etc.)
  • On desktop: swaps only pointer (hand) cursors to the backup finger for the configured duration. Default arrow stays normal
  • Extra rage clicks during an active session extend the duration
  • On touch or coarse-pointer devices: no popover and no fake cursor (onActivate / onRestore still run)
  • With prefers-reduced-motion: reduce and popover: "bottom", skips the fake cursor entirely

mode: "always"

  • Swaps the cursor to the backup finger on the attached element and its children immediately
  • Other elements on the page keep their normal cursor. Useful for pricing grids or single CTAs
  • No click counting, popover, or auto-timeout

Notes

  • Does not call preventDefault. Your button keeps working

Disclaimer

Opt-in easter egg. Some corporate networks or filters may block the imagery. Don't attach to critical production flows unless that's intentional.

License

Demo (local)

git clone https://github.com/ahmdhsn-dev/second-finger.git
cd second-finger
npm install
npm run dev

Open the local demo, tweak the config panel, and click any example button until the backup finger shows up. Same options as the live demo.