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

@sage-box/tooltip

v0.1.1

Published

Tooltip component for SageBox - Contextual information on hover/focus

Readme

sg-tooltip

Tooltip component for displaying contextual information.

Features

  • Multiple positions (top, bottom, left, right)
  • Trigger modes (hover, click, focus, manual)
  • Visual variants (default, dark, light, primary, success, warning, error)
  • Show/hide delays
  • Arrow pointer
  • Interactive mode
  • Accessibility support

Usage

Basic

<sg-tooltip text="This is a helpful tooltip">
  <button>Hover me</button>
</sg-tooltip>

Positions

<sg-tooltip text="Top" position="top">...</sg-tooltip>
<sg-tooltip text="Bottom" position="bottom">...</sg-tooltip>
<sg-tooltip text="Left" position="left">...</sg-tooltip>
<sg-tooltip text="Right" position="right">...</sg-tooltip>

Trigger Modes

<!-- Hover (default) -->
<sg-tooltip text="Hover tooltip" trigger="hover">...</sg-tooltip>

<!-- Click -->
<sg-tooltip text="Click to toggle" trigger="click">...</sg-tooltip>

<!-- Focus -->
<sg-tooltip text="Focus tooltip" trigger="focus">...</sg-tooltip>

<!-- Manual control -->
<sg-tooltip text="Manual" trigger="manual" open>...</sg-tooltip>

Variants

<sg-tooltip text="Primary" variant="primary">...</sg-tooltip>
<sg-tooltip text="Success" variant="success">...</sg-tooltip>
<sg-tooltip text="Warning" variant="warning">...</sg-tooltip>
<sg-tooltip text="Error" variant="error">...</sg-tooltip>

With Custom Content

<sg-tooltip>
  <button>Info</button>
  <div slot="content">
    <strong>Rich content</strong>
    <p>With HTML support</p>
  </div>
</sg-tooltip>

Programmatic Control

const tooltip = document.querySelector('sg-tooltip');

// Show tooltip
await tooltip.show();

// Hide tooltip
await tooltip.hide();

// Toggle
await tooltip.toggle();

CSS Custom Properties

| Property | Description | Default | |----------|-------------|---------| | --sg-tooltip-bg | Background color | #1f2937 | | --sg-tooltip-color | Text color | #ffffff | | --sg-tooltip-radius | Border radius | 0.375rem | | --sg-tooltip-padding | Content padding | 0.5rem 0.75rem | | --sg-tooltip-font-size | Font size | 0.8125rem | | --sg-tooltip-shadow | Box shadow | 0 4px 6px... | | --sg-tooltip-offset | Distance from trigger | 8px |