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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ng-alertbar

v1.2.1

Published

A configurable alertbar for Angular

Downloads

2

Readme

ngAlertbar

A configurable alertbar for Angular

Installation

  1. Install using npm
npm install --save ng-alertbar
  1. Add the themes/default.css stylesheet to your angular.json styles array

  2. Import NgAlertBarModule into your angular module

@NgModule({
  imports: [..., NgAlertbarModule.forRoot()]
})
  1. Add the alertbar component to your app template
  <ng-alertbar [lifeTime]="3000" ...></ng-alertbar>
  1. Inject NgAlertBarService and call triggerAlert(...)
constructor(private alertBarService: NgAlertBarService) {}

ngOnInit() {
  const options: AlertOptions = {...};
  this.alertBarService.triggerAlert('Custom message', options);
}

Options

| Option Name | Description | Type | Default | Required | | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ------------------------------------------------- | -------- | | queueing (component) | Whether to add incoming alert triggers to a queue for later display if an alert is currently open | true | boolean | | | bypassQueue (trigger) | Whether the alert should not respect the queueing process. If set to false, the alert will be displayed immediately upon trigger even if another alert is currently shown | boolean | false | | | lifeTime | The time in ms between the alert opening and auto-closing. If the lifetime is set to 0, the alert will not autoclose | number | 5000 | | | showDelay | The time in ms between the alert trigger firing and the alert showing | number | 100 | | | backgroundColor | The background color of the alert | string | 'linear-gradient(to top right, #9ce29c, #c9f9b9)' | | | borderColor | The border color of the alert | string | '#34a40e' | | | textColor | The color of the alert text | string | 'black' | | | widthMode | 'full': The alert will take up the whole width of the container 'partial': The alert will only use the space required | 'full' | 'partial' | 'partial' | | | html | Whether to inject the provided message as html or render it as plaintext | boolean | false | |

Note: Options denoted with (component) can only be applied as a component input, whereas options denoted with (trigger) can only be applied to individual alert triggers