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-toastit

v1.0.2

Published

An unobtrusive toast module for Angular. [Demo](https://monolizard.github.io/ngx-toastit/)

Readme

ngx-toastit

An unobtrusive toast module for Angular. Demo

npm-badge

Usage

  • Install toastit
npm i -S ngx-toastit
  • Also install peer dependencies if you're missing them.
  • Add ToastitModule to your project
@NgModule({
    declarations: [AppComponent],
    imports: [ToastitModule],
    bootstrap: [AppComponent]
})
export class AppModule { }
  • Inject ToastitService when you want to add a toastit
public constructor(private toastitService: ToastitService) {}

public AddToastit(){
    this.toastitService.add(options: IToastit);
}

Methods

ToastitService.add(options: IToastit): number

Adds a toastit with the supplied options (Refer to options section for posible values). Returns added toastit id, you can use this for premature removing.


ToastitService.remove(id: number): void

Removes a toastit with the supplied id. This method will play exit animation. If a toastit is not found with this id, method will fail silently and will print a warning to console.


ToastitService.removeAll(): number

Removes all toastits from screen. This method will not play exit animations.

Options

Required

title: string = ''

Toastit title.

Optional

align: ToastitAlign = ToastitAlign.TR

The point where the toastit will appear. Default value is top right.

| type | info | | ---- | ---- | | ToastitAlign.TR | Top right | | ToastitAlign.TC | Top center | | ToastitAlign.TL | Top left | | ToastitAlign.BR | Bottom right | | ToastitAlign.BC | Bottom center | | ToastitAlign.BL | Bottom left |


enterAnimation: any = ToastitAnimation.fadeIn

Animation config for entering toastits. Animations use material design motion for its easings and timings. Check the demo page for visualization.

| type | | ---- | | ToastitAnimation.fadeIn | | ToastitAnimation.shrinkIn | | ToastitAnimation.slideInLeft | | ToastitAnimation.slideInRight | | ToastitAnimation.slideInTop | | ToastitAnimation.slideInBottom | | ToastitAnimation.scaleIn |


leaveAnimation: any = ToastitAnimation.fadeOut

Animation config for exiting toastits. Animations use material design motion for its easings and timings. Check the demo page for visualization.

| type | | ---- | | ToastitAnimation.fadeOut | | ToastitAnimation.shrinkOut | | ToastitAnimation.slideOutLeft | | ToastitAnimation.slideOutRight | | ToastitAnimation.slideOutTop | | ToastitAnimation.slideOutBottom | | ToastitAnimation.scaleOut |


parent: string | Element = 'body'

Toasit parent, could be a selector string or Element.


timeout: number = 5

Toastit will wait x seconds before exiting.


type: ToastitType = ToastitType.Info

Toastit type.

| type | info | | ---- | ---- | | ToastitType.Info | Used for info messages | | ToastitType.Pin | Pinned toastits will remain in place until you remove it manually | | ToastitType.Progress | Progress toastit, used in conjunction with observables, has an animation icon | | ToastitType.Success | Used for success messages | | ToastitType.Warning | Used to show error messages |


message: string = ''

Toastit message.


observable: Observable<any> = undefined

If an observable is supplied, toastit will subscribe to it and exit after the observable is finished.

Styling

Toastit uses BEM notation for its classes and ViewEncapsulation.NONE in Angular so its styles can be customized in global scope with ease.

| class | info | | ----- | ---- | | .toastit | Main toastit class | | .toastit--info | Type added main class | | .toastit--align-top-right | Align added main class | | .toastit__icon | Icon class | | .toastit__icon--info | Type added icon class | | .toastit__content | Parent class of title and message | | .toastit__title | Title class | | .toastit__title--info | Type added title class | | .toastit__message | Message class | | .toastit__message--info | Type added message class |