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

@asnewyla/unstyled-tooltip

v0.2.0

Published

Unstyled tooltip primitive — hover/focus open with delay, Escape to dismiss, accessible aria-describedby wiring

Readme

@asnewyla/unstyled-tooltip

Unstyled, accessible tooltip primitive. Compound components, hover/focus open with a delay, Escape to dismiss — no visual styling, the base layer under @asnewyla/tooltip.

Install

npm install @asnewyla/unstyled-tooltip

Usage

import {
  Tooltip,
  TooltipTrigger,
  TooltipContent,
} from '@asnewyla/unstyled-tooltip';

<Tooltip>
  <TooltipTrigger>
    <button type="button">Save</button>
  </TooltipTrigger>
  <TooltipContent>Saves your work automatically</TooltipContent>
</Tooltip>

// Controlled
<Tooltip open={open} onOpenChange={setOpen}>
  ...
</Tooltip>

Components

| Component | Renders | Notes | |---|---|---| | Tooltip | <span> wrapper | Owns open state (open/defaultOpen/onOpenChange), delay? (hover open delay, ms, default 700). The wrapper is position: relative; display: inline-block so TooltipContent can place itself with plain CSS | | TooltipTrigger | its single child, cloned | Injects aria-describedby (while open) and pointer/focus/blur handlers onto whatever element you pass — a <button>, a link, an input. The child must forward ref and props | | TooltipContent | <span role="tooltip"> | side?data-side (top/right/bottom/left, default top). Rendered only while open |

Behavior

  • Opens on pointer enter after delay ms, or immediately on keyboard focus.
  • Closes on pointer leave, blur, Escape, or pressing the trigger.
  • Escape closing is the one hard WAI-ARIA requirement and works regardless of how the tooltip was opened.
  • aria-describedby on the trigger points at the content's id only while the tooltip is open.

Not yet supported

  • Collision-aware positioning. side is honored as-is; a tooltip near a viewport edge is not flipped or shifted.
  • Portal rendering. The content renders inline, so an ancestor with overflow: hidden can clip it.
  • Hoverable content. Moving the pointer onto the tooltip closes it — it's for display, not interaction.

License

MIT