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

ember-addon-toast-message

v1.2.1

Published

The default blueprint for ember-cli addons.

Readme

Ember-addon-toast-message

alt text

Installation

  • ember install ember-addon-toast-message

or add it to the package.json and run npm install

The add-on contains a service notification and a component notification-toast-message. To use the add-on you need to bind the service to the component properties.

Example usage

In your template

{{notification-toast-message
  isOpen=notification.isOpen
  type=notification.type
  message=notification.message
  icon=notification.icon
  actionToBeExecuted=notification.actionToBeExecuted
  actionText=notification.actionText
  transitionObjectSelector=notification.transitionObjectSelector}}

In your controller

notification: Ember.inject.service(),

And to activate your toast you need to call the show() method of the service.

this.get('notification').show(
                "Could not save your record", //Message to be shown
                "default",  //Type of the notification
                this.retryAction, //Action the toast message will invoked once clicked on the button
                "Retry", //Message for the button which invoked the action
                ".save-btn") //This is a query selector for one html element
  • When calling the show method, Type error is thrown if query selector is passed and no element is found.
  • Every property is mandatory except the message in the toast.
  • If an action is passed to the show() method, the toast will last 5 seconds (5000ms) and if not 2 seconds (2000ms)

Meaning of the components properties.

  1. isOpen Controlls if the toast is shown or not. When this property changes (from the show() function in the service) it will display the toast.
  2. type This is the type of the notification (default / static-notification)
  3. message The message which will be displayed in the toast.
  4. icon The icon which will be displayed in the toast.
  5. actionToBeExecuted Closure which will be invoked if the action button is clicked.
  6. actionText The text of the action button.
  7. transitionObjectSelector This is a query selector for one html element. If present in the DOM, that element will be moved up to compensate the height of the toast.
If the show() method is called twice, the service will wait untill the first toast disappears.

TODO

  • [ ] Currently the toast transitions with fixed height (75px) for desktop, remove the hardcoded px