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

ngx-yet-another-toast-library

v22.0.0

Published

A lightweight, signal-based Angular toast notification library with Bootstrap 5 color palette

Readme

ngx-yet-another-toast-library

A lightweight, signal-based Angular toast notification library with Bootstrap 5 color palette support. No template tag required — the container mounts itself automatically.

Requirements

  • Angular 22+

Installation

npm install ngx-yet-another-toast-library

Setup

Call provideToastService() in your app.config.ts:

import { provideToastService } from 'ngx-yet-another-toast-library';

export const appConfig: ApplicationConfig = {
  providers: [
    provideToastService()
  ],
};

That's it — no <toast-container> tag needed.

Usage

Inject ToastService and call any notification method:

import { ToastService } from 'ngx-yet-another-toast-library';

@Component({ ... })
export class AppComponent {
  private readonly toastService = inject(ToastService);

  showExamples() {
    this.toastService.info('This is an info message', 'Info');
    this.toastService.success('Saved successfully!');
    this.toastService.error('Something went wrong', 'Error');
    this.toastService.warning('Please check your input');
  }
}

All notification types

toastService.info(message, title?, options?)
toastService.success(message, title?, options?)
toastService.error(message, title?, options?)
toastService.warning(message, title?, options?)
toastService.primary(message, title?, options?)
toastService.secondary(message, title?, options?)
toastService.light(message, title?, options?)
toastService.dark(message, title?, options?)
toastService.custom(data: CustomToastData)  // fully custom colors

Dismissing toasts

const ref = toastService.info('Hello!');

// Dismiss a specific toast
toastService.dismiss(ref.id);

// Dismiss all toasts
toastService.dismissAll();

Configuration

Pass a ToasterConfig object to provideToastService():

provideToastService({
  position: 'bottom-right',    // default: 'top-right'
  newestOnTop: false,          // default: true
  defaultOptions: {
    duration: 3000,            // ms, 0 = no auto-dismiss. default: 5000
    dismissible: true,         // show close button. default: true
    progressBar: true,         // shrinking progress bar. default: false
    disableAnimation: false,   // default: false
  },
})

Positions

'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center'

Per-toast options (ToastOptions)

| Option | Type | Default | Description | |--------------------|-----------|---------|--------------------------------------------------| | duration | number | 5000 | Auto-dismiss delay in ms. 0 disables it. | | dismissible | boolean | true | Show a close button. | | progressBar | boolean | false | Show a shrinking progress bar. | | disableAnimation | boolean | false | Skip the enter animation. |

ToastRef

Every method returns a ToastRef with reactive state:

const ref = toastService.success('Done!');

ref.id          // string — unique ID
ref.isActive()  // signal<boolean> — true while visible
ref.isHovered() // signal<boolean> — true while mouse is over the toast
ref.dismiss()   // programmatically dismiss
ref.onDismiss$  // Observable<void> — emits when dismissed

Custom toasts

Use toastService.custom() to supply your own colors:

toastService.custom({
  message: 'Purple toast!',
  title: 'Custom',
  backgroundColor: '#7c3aed',
  textColor: '#ffffff',
  borderColor: '#5b21b6',
});

Theming

Colors match the Bootstrap 5 subtle palette by default. Override any token globally in your styles.scss:

:root {
  --toast-success-bg:     #d1e7dd;
  --toast-success-color:  #0a3622;
  --toast-success-border: #a3cfbb;
}

Available tokens (replace * with a type name):

| Token | Types | |------------------------|--------------------------------------------------------| | --toast-*-bg | info, success, error, warning, primary, secondary, light, dark | | --toast-*-color | same as above | | --toast-*-border | same as above |

License

MIT — see LICENSE.