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

@bloc-ui/tooltip

v1.0.7

Published

Hover/focus tooltip directive for Angular with intelligent repositioning and delay control.

Readme

@bloc-ui/tooltip

Latest: v1.0.7

Hover/focus tooltip with intelligent repositioning and delay control, built on the @bloc-ui/overlay platform layer.

Live Documentation & Demos

Installation

npm install @bloc-ui/tooltip

Usage

<button [blocTooltip]="'Save changes'">Save</button>

<!-- All four placement sides -->
<button [blocTooltip]="'Opens above'" tooltipPosition="top">Top</button>
<button [blocTooltip]="'Opens below'" tooltipPosition="bottom">Bottom</button>
<button [blocTooltip]="'Opens left'" tooltipPosition="left">Left</button>
<button [blocTooltip]="'Opens right'" tooltipPosition="right">Right</button>

<!-- Disabled -->
<button [blocTooltip]="'Not available'" [tooltipDisabled]="true">Locked</button>

Inputs

| Input | Type | Default | Description | | ------------------ | ---------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------- | | blocTooltip | string | — | Tooltip text content (required) | | tooltipPosition | 'top' \| 'bottom' \| 'left' \| 'right' | 'top' | Placement of the tooltip panel. Alignment variants (top-start, bottom-end, etc.) are also accepted. | | tooltipDisabled | boolean | false | When true, tooltip will not appear | | tooltipShowDelay | number | 200 | Milliseconds before showing the tooltip | | tooltipHideDelay | number | 100 | Milliseconds before hiding the tooltip |

CSS tokens

| Token | Default | Description | | ---------------------------- | --------- | ----------------------- | | --bloc-tooltip-bg | #374151 | Panel background colour | | --bloc-tooltip-color | #f9fafb | Panel text colour | | --bloc-tooltip-padding | 4px 8px | Panel padding | | --bloc-tooltip-radius | 4px | Panel border radius | | --bloc-tooltip-font-size | 12px | Panel font size | | --bloc-tooltip-max-width | 240px | Maximum panel width | | --bloc-tooltip-line-height | 1.4 | Panel line height |

Accessibility

  • The tooltip panel has role="tooltip" so screen readers announce it correctly.
  • When the tooltip is visible, the host element receives aria-describedby pointing to the panel's id. The attribute is removed when the tooltip hides.
  • The tooltip panel has no tabindex and is never placed in the tab order — it cannot be reached via keyboard navigation.
  • Show/hide is triggered by both mouse (mouseenter/mouseleave) and keyboard (focus/blur), ensuring full keyboard accessibility without additional configuration.
  • Escape key dismisses the tooltip without moving pointer or keyboard focus (WCAG 2.1 SC 1.4.13 — Dismissible).
  • The pointer can move from the host element over the tooltip panel without the tooltip disappearing (WCAG 2.1 SC 1.4.13 — Hoverable). The tooltip hides after the pointer leaves the panel.

Keyboard & Focus Behaviour

The tooltip appears after a short delay (tooltipShowDelay, default 200 ms) when the host element receives hover (mouseenter) or keyboard focus (focus). It hides when the pointer leaves the host or focus moves away (blur), after a tooltipHideDelay (default 100 ms).

You can move the pointer from the host element directly into the tooltip panel — the hide timer is cancelled on mouseenter of the panel, so the panel stays visible while you read or copy its content. The tooltip hides once the pointer leaves the panel.

Pressing Escape while the tooltip is visible dismisses it immediately without moving pointer or keyboard focus, satisfying WCAG 2.1 SC 1.4.13 (Content on Hover or Focus — Dismissible).