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

@flexzap/overlay

v1.2.1

Published

All the overlay components that makes part of the flexzap library

Downloads

396

Readme

@flexzap/overlay

Flexible and reusable overlay components for Angular applications. Part of the FlexZap Library ecosystem.

Installation

npm install @flexzap/overlay

Peer Dependencies

This library requires the following peer dependencies:

npm install @angular/common@^21.0.0 @angular/core@^21.0.0

Usage

Basic Implementation

import { Component } from '@angular/core';
import { ZapTooltip } from '@flexzap/overlay';

@Component({
  imports: [ZapTooltip],
  template: `
    <button (mouseenter)="isVisible = true" (mouseleave)="isVisible = false">
      Hover Me
      <zap-tooltip [visible]="isVisible" [position]="'top'"> Tooltip Content </zap-tooltip>
    </button>
  `
})
export class MyComponent {
  isVisible = false;
}

Directive Implementation (Recommended)

The ZapTooltipBind directive simplifies usage by automatically handling hover events for sibling tooltips.

import { Component } from '@angular/core';
import { ZapTooltip, ZapTooltipBind } from '@flexzap/overlay';

@Component({
  imports: [ZapTooltip, ZapTooltipBind],
  template: `
    <button>
      <span ZapTooltipBind>Hover Me</span>
      <zap-tooltip [position]="'right'"> Tooltip Content </zap-tooltip>
    </button>
  `
})
export class MyComponent {}

API Reference

ZapTooltip Component

A lightweight tooltip component that positions itself relative to its container.

Inputs

| Property | Type | Default | Description | | ---------- | ---------------------------------------- | ------------ | ----------------------------------------------------- | | position | 'top' \| 'right' \| 'bottom' \| 'left' | Required | Sets the position of the tooltip relative to the host | | visible | boolean | false | Controls the visibility of the tooltip |

ZapTooltipBind Directive

A helper directive that binds hover events (mouseenter, mouseleave) to toggle the visibility of sibling zap-tooltip components.

Selector: [ZapTooltipBind]

ZapModalShell Component

A modal shell component that displays content over a backdrop. It handles closing interactions (Escape key, close button, backdrop click) by emitting a close event, allowing the parent to control visibility state.

Inputs

| Property | Type | Default | Description | | --------- | --------- | ------------ | ------------------------------------------ | | visible | boolean | Required | Controls the visibility of the modal shell |

Outputs

| Property | Type | Description | | -------- | ------ | ------------------------------------------------------------------------------------ | | close | void | Emits when the modal requests to close (e.g. Escape key, close icon, backdrop click) |

Example Usage

@Component({
  imports: [ZapModalShell, ZapButton],
  template: `
    <zap-button (clicked)="showModal.set(true)">Open Modal</zap-button>

    <zap-modal-shell [visible]="showModal()" (close)="showModal.set(false)">
      <h2>My Modal</h2>
      <p>Content goes here.</p>
    </zap-modal-shell>
  `
})
export class MyComponent {
  showModal = signal(false);
}

Styling

The component uses SCSS for styling. You can customize the appearance by overriding the default styles:

zap-tooltip {
  // Custom tooltip styles
  --zap-tooltip-bg-color: #333;
  --zap-tooltip-text-color: #fff;
}

Testing

This library uses Jest for unit testing with zoneless Angular configuration.

Running Tests

# From the monorepo root
npm run overlay:test            # Run all unit tests with coverage
npm run overlay:test:watch      # Run tests in watch mode (no coverage)

Development

Building the Library

# From the monorepo root
npm run overlay:build       # Build the library
ng build @flexzap/overlay   # Build directly using CLI

Code Scaffolding

To generate new components within this library:

ng generate component [component-name] --project @flexzap/overlay

Publishing

Build for Publication

# From the monorepo root
npm run overlay:build

Publish to NPM

cd dist/flexzap/overlay
npm publish --access public

Contributing

This library is part of the FlexZap Library monorepo. Please refer to the main repository for contribution guidelines.

License

MIT License - see the LICENSE file for details.