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

@kit-ng-ui/tooltip

v0.1.0

Published

Kit UI Tooltip component — hover / focus / click triggered text overlay with 12 placements.

Readme

@kit-ng-ui/tooltip

Hover / focus / click triggered text overlay for Kit UI. Mirrors ant-design's Tooltip.

Install

pnpm add @kit-ng-ui/tooltip @kit-ng-ui/core

Styles

// app styles.scss
@use '@kit-ng-ui/core/styles' as *;
@use '@kit-ng-ui/tooltip/styles' as tooltip;

Use

import { Component } from '@angular/core';
import { KitTooltipComponent } from '@kit-ng-ui/tooltip';

@Component({
  standalone: true,
  imports: [KitTooltipComponent],
  template: `
    <!-- Basic -->
    <kit-tooltip title="Hello">
      <button>Hover me</button>
    </kit-tooltip>

    <!-- Click trigger + placement -->
    <kit-tooltip title="Pinned" placement="bottomLeft" trigger="click">
      <button>Click me</button>
    </kit-tooltip>

    <!-- Rich content -->
    <kit-tooltip [titleTpl]="rich" placement="right">
      <kit-icon name="info" />
    </kit-tooltip>
    <ng-template #rich><b>Bold</b> hint with <i>style</i></ng-template>

    <!-- Custom color -->
    <kit-tooltip title="Brand" color="#5b21b6">
      <span>brand swatch</span>
    </kit-tooltip>
  `,
})
export class Demo {}

API

<kit-tooltip>

| Input | Type | Default | Description | | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ---------------------------------------------------------------------- | | arrow | boolean | true | Show the arrow pointing at the trigger. | | color | string \| null | null | Custom CSS color for the overlay background and arrow. | | disabled | boolean | false | Disable the tooltip without removing it from the DOM. | | mouseEnterDelay | number | 100 | Open delay (ms) for the hover trigger. | | mouseLeaveDelay | number | 100 | Close delay (ms) for the hover trigger. | | open | boolean (two-way [(open)]) | false | Controlled open state. | | placement | 'top' \| 'topLeft' \| 'topRight' \| 'bottom' \| 'bottomLeft' \| 'bottomRight' \| 'left' \| 'leftTop' \| 'leftBottom' \| 'right' \| 'rightTop' \| 'rightBottom' | 'top' | Overlay position relative to the trigger. | | textColor | string \| null | null | Paired text color when [color] is set. Falls back to white. | | title | string \| null | null | Overlay text. Ignored when [titleTpl] is set. | | titleTpl | TemplateRef \| null | null | Rich-content alternative to [title]. | | trigger | 'hover' \| 'focus' \| 'click' | 'hover' | What gesture opens the overlay. |

| Output | Type | Description | | --------------- | --------------------- | ------------------------------------------------- | | visibleChange | EventEmitter<boolean> | Fires when the open state changes (either trigger or model). |

Behavior notes

  • Inline positioning, not body-portalled. The overlay is rendered as a sibling of the trigger inside the wrapper. Ancestors with overflow: hidden clip the overlay. Body-portalled overlays are tracked as TODO(parity) and will arrive with @kit-ng-ui/util.
  • aria-describedby is applied to the first focusable descendant of the projected trigger — not to the wrapper — so screen readers announce the tooltip when focus lands on the actual button or link. Make sure your trigger is a focusable element (<button>, <a href>, an input, or anything with tabindex). If no focusable descendant exists, the attribute is not applied.
  • Escape closes the tooltip while open. The document keydown listener is attached only while open, and the outside-click listener is attached only when trigger='click' and open — so a page with many idle tooltips doesn't pile up global listeners.
  • Disable while open? Setting [disabled]=true while the tooltip is open auto-closes it.
  • Hover delay also gates closing: leaving the trigger does not immediately close — moving onto the overlay keeps it open, mirroring ant-design's pinning behavior.
  • Custom color is propagated via the --kit-tooltip-bg and --kit-tooltip-text custom properties, so the arrow inherits the same color.