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

toasteo

v1.0.7

Published

Simple Toast plugin that is lightweight and written in vanilla JS.

Downloads

16

Readme

Toasteo JS

A simple Toast package that is lightweight (5kb~) with zero dependencies written in vanilla JS

Getting started

Install from npm

npm install --save-dev toasteo

In your JS file

import Toasteo from "toasteo";
window.Toasteo = new Toasteo({});

In your SCSS file

import "~toasteo/dist/css/toasteo.css";

Using the UMD

A UMD version is available in case you are not using webpack or babel. This version has not been compiled to ES5, you should therefor check if your browser supports ES6. You can import it using the following script:

<script src="/node_modules/toasteo/dist/js/toasteo.umd.js"></script>
<script>window.Toasteo = new Toasteo({});</script>
<script src="/node_modules/toasteo/dist/css/toasteo.css"></script>

Basic usage

There is four toasts ready to be used, a success toast, an error toast, a warning toast and an info toast. They all use the same syntax, the only difference is the style applied.

window.Toasteo.success('My success toast');
window.Toasteo.error('My error toast');
window.Toasteo.warning('My warning toast');
window.Toasteo.info('My info toast');

This all works by default using the provided CSS.

Options

You can change the default options when initializing the package.

window.Toasteo = new Toasteo(options};

| Option | Description | Default | |:-------------|:-------------|:-----| | prependTo | The dom element that the toast notification will be prepended to. | document.body.childNodes[0] | | duration | The duration after which the toast will be removed. | 4000 (ms) | | animateOnRemoving | Animate the toast when removing it by adding a CSS class. | true | | animationRemovingDuration | The duration of the remove animation in milliseconds, after which the toast will be removed from the DOM | 400 | | animateOnCreation | Animate the toast when creating it by adding a CSS class. | true | | closeOnClick | The toast should be removed when clicked. | true | | classes | The default classes used by the package. Please see below for the explaination and default values. |  |

| Class | Description | Default | |:-------------|:-------------|:-----| | container | The class set to the toasts container | toast-container | | default | The class set to every toast | toast | | closing | The class set to a toast when using the close method | toast--closing | | creating | The class set to a toast when creating it | toast--creating | | success | The class set to a toast with the success type | toast--success | | error | The class set to a toast with the error type | toast--error | | warning | The class set to a toast with the warning type | toast--warning | | info | The class set to a toast with the info type | toast--info |

Demo & Documentation

You can see Toasteo in action on the demo page as well as a better documentation.