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

super-hover

v0.0.3

Published

A super tiny library that hit-tests hover every frame. Unlike native :hover, it keeps tracking whatever sits under your pointer while you scroll or when things move on screen.

Readme

super-hover

A super tiny library that hit-tests hover every frame. Unlike native :hover, it keeps tracking whatever sits under your pointer while you scroll or when things move on screen.

Why use this?

Well, you probably don't need this. While scrolling, browsers mostly skip updating :hover for performance reasons, which most sites actually need. But super-hover recomputes a hover-like hit every frame, which opens up some fun creative effects!

Under the hood it listens for pointer moves, scroll, and resize, then hit-tests once per animation frame (updates are coalesced with requestAnimationFrame): document.elementFromPoint plus Element.closest(selector).

Install

pnpm add super-hover
# or npm / yarn

The super-hover entry is framework-free. super-hover/react, super-hover/vue, and super-hover/svelte add small helpers. React and Vue are optional peer dependencies.

Markup & styling

  • Mark participating nodes with data-super-hover (or pass a custom selector).
  • The active matched element gets data-super-hover-active (customizable). Style it with attribute selectors, e.g. Tailwind data-[super-hover-active]:….

Usage

Vanilla (createSuperHover)

import { createSuperHover } from "super-hover";

const list = document.querySelector("#list") as HTMLElement | null;
const dispose = createSuperHover({ root: list ?? undefined });

// Later:
dispose();

Options (SuperHoverOptions)

| Option | Default | Purpose | |--------|---------|---------| | root | omit (whole document) | Hit-tested nodes must be inside this subtree. Does not opt in every descendant—that’s still gated by selector. | | selector | [data-super-hover] | Passed to closest() from the node under the pointer. | | activeAttribute | data-super-hover-active | Set on the active element while active (empty string), removed when inactive. | | enterEventType | superhoverenter | CustomEvent when an element becomes active (bubbles: true). | | leaveEventType | superhoverleave | CustomEvent when it stops being active. |

React

useSuperHoverRef wires createSuperHover when the root mounts.

import { useSuperHoverRef } from "super-hover/react";

export function Example() {
  const rootRef = useSuperHoverRef();

  return (
    <ul ref={rootRef} className="space-y-1">
      <li data-super-hover className="rounded px-3 py-2 transition-colors data-[super-hover-active]:bg-neutral-100 dark:data-[super-hover-active]:bg-neutral-900">
        …
      </li>
    </ul>
  );
}

Use useSuperHover(root, options) if you already hold an HTMLElement | null. UseSuperHoverOptions adds enabled, onEnter, onLeave, plus the vanilla options except root.

Vue

<script setup lang="ts">
import { useSuperHover } from "super-hover/vue";

const rootRef = useSuperHover({
  onEnter(e) {},
  onLeave(e) {},
});
</script>

<template>
  <ul ref="rootRef" class="space-y-1">
    <li data-super-hover class="rounded px-3 py-2 transition-colors data-[super-hover-active]:bg-neutral-100 dark:data-[super-hover-active]:bg-neutral-900">
      …
    </li>
  </ul>
</template>

Svelte

Attach the superHover action to the list root:

<script lang="ts">
  import { superHover } from "super-hover/svelte";
</script>

<ul class="space-y-1" use:superHover={{ onEnter(e) {}, onLeave(e) {} }}>
  <li data-super-hover class="rounded px-3 py-2 transition-colors data-[super-hover-active]:bg-neutral-100 dark:data-[super-hover-active]:bg-neutral-900">
    …
  </li>
</ul>

Events

Framework helpers listen on root for bubbling superhoverenter / superhoverleave (names configurable). onEnter / onLeave receive the DOM event; event.target is the matched row.

With vanilla createSuperHover, add addEventListener on document or your subtree root for those events.

Links

License

MIT — see LICENSE.