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

@vi5hnuu/ngx-noti

v1.2.0

Published

A lightweight and customizable Angular notification system with service-based triggering and auto-dismiss support.

Readme

🚀 NgxNoti - Lightweight Angular Notification Service

NgxNoti is a lightweight and flexible notification service and component built for Angular. Easily trigger customizable notifications anywhere in your application — fully animated, dismissable, and configurable.

✨ Features

  • Add success, error, info, or warning notifications from any service/component
  • Auto-dismiss with configurable visibility time, paused while the user hovers or focuses
  • Manual dismiss and "clear all" support
  • Responsive: full-width on phones, a compact column on tablets, unchanged on desktop
  • Accessible: role="alert" with a live region, and a real, keyboard-operable close button
  • Capped stack so a burst of notifications cannot bury the screen
  • No CSS framework dependency — the component ships ~4 kB of its own styles
  • Compatible with Angular standalone APIs

📦 Installation

npm i @vi5hnuu/ngx-noti

⚙️ Setup

1. Provide animations (the service is providedIn: 'root')

NgxNotiService registers itself, so no provider entry is required. List it in a component's providers only if you want that part of the app to have its own isolated stack.

// main.ts or app.config.ts
import { NgxNotiService } from '@vi5hnuu/ngx-noti';
import { ApplicationConfig } from '@angular/core';
import { provideRouter } from '@angular/router';
import { provideHttpClient } from '@angular/common/http';
import { provideAnimations } from '@angular/platform-browser/animations';

export const appConfig: ApplicationConfig = {
  providers: [
    ...
    provideAnimations(),
    ...
  ],
...

📝 You can also provide NgxNotiService at the component level if you prefer isolated instances.


2. Add the notifications panel to your layout (usually in AppComponent):

<!-- app.component.html -->
<lib-notifications-panel [notificationsPosition]="NotificationPosition.BOTTOM_LEFT" />

The panel dismisses through the service itself, so no output wiring is needed. The (dismiss) and (dismissAll) outputs still fire if you want to react to them:

<lib-notifications-panel
  [notificationsPosition]="NotificationPosition.BOTTOM_LEFT"
  [maxStack]="5"
  [pauseOnHover]="true"
  (dismiss)="onDismissed($event)"
  (dismissAll)="onCleared()"
/>

Panel inputs

| Input | Default | Purpose | |---|---|---| | notificationsPosition | BOTTOM_RIGHT | Which corner or edge the stack grows from | | maxStack | 5 | Most notifications on screen at once; the oldest is dropped past this | | pauseOnHover | true | Hold a notification open while hovered or keyboard-focused | | clearAllThreshold | 2 | Stack depth at which the "clear all" control appears |


3. Inject and use NgxNotiService to trigger notifications:

import { Component } from '@angular/core';
import {NgxNotiService, NotificationsPanelComponent,NotificationPosition,NotificationType} from '@vi5hnuu/ngx-noti';


@Component({
  selector: 'app-sample',
  templateUrl: './sample.component.html',
})
export class SampleComponent {
  constructor(public ngxNoti: NgxNotiService) {}

  notifySuccess() {
    this.ngxNoti.addNotification({
      title: 'Upload Complete',
      type: NotificationType.SUCCESS,
      description: 'Your file was uploaded successfully.',
      visibilityTimeMs: 3000,
    });
  }
}

📚 API Reference

addNotification({ title, type, description?, visibilityTimeMs?, iconSrc?, templateRef? }): string

Adds a new notification to the queue and returns its id, so you can dismiss or update it later.

  • title – Notification title (required)
  • typeNotificationType enum (SUCCESS, ERROR, INFO, WARNING)
  • description – Optional description
  • visibilityTimeMs – Optional auto-dismiss delay (defaults to infinite if not set)
  • iconSrc – Optional [for notification icon]
  • templateRef - Optional [for notification icon]

Priority - iconSrc > templateRef > default

ℹ️ Note:
For default icons to work, you need to add the following to your angular.json:

{
  "glob": "**/*",
    "input": "node_modules/@vi5hnuu/ngx-noti/assets/",
    "output": "assets/ngx-noti"
}

clearNotification(id: string)

Dismiss a specific notification manually. Safe to call for an id that has already gone.


clearAllNotifications()

Clears all active notifications and cancels their timers.


update(id: string, patch: NotificationPatch)

Change title, description, type or iconSrc on a live notification — useful for a toast that reports progress. No-op if the notification has already been dismissed.

const id = this.ngxNoti.addNotification({ title: 'Uploading…', type: NotificationType.INFO });
// later
this.ngxNoti.update(id, { title: 'Upload complete', type: NotificationType.SUCCESS });
this.ngxNoti.clearNotification(id);

pause(id: string) / resume(id: string)

Hold a notification open and let it continue. The panel calls these for you when pauseOnHover is on; they are public for cases the panel cannot see.


📌 Notification Positions

Use the NotificationPosition enum:

  • TOP_LEFT
  • TOP_RIGHT
  • BOTTOM_RIGHT
  • BOTTOM_LEFT
  • TOP_CENTER
  • BOTTOM_CENTER

📌 Test View



✅ License

MIT License. Created by Vishnu kumar.


🔗 Connect with Me

Feel free to connect with me on social media: