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

itstoaster

v1.1.1

Published

A lightweight toast notification package for JavaScript

Readme

🔔 itstoaster

A lightweight, theme-aware, and customizable toast notification system — built for modern web apps.


📦 Installation

npm install itstoaster

or

yarn add itstoaster

🛠️ Usage

1. Import JavaScript and CSS

import { Toaster } from "itstoaster";
import "itstoaster/style.css";

2. Create a toast instance

const toast = new Toaster({
  containerId: "custom-toast-container", // optional
  stack: 5 // optional: max number of toasts visible at once
});

3. Show a toast

toast.success({
  title: "Success!",
  description: "Your settings have been saved.",
  duration: 3000, // optional (default: 3000ms)
  dismissable: true, // optional
  position: "top-right" // optional: top-left, top-center, top-right
});

toast.warning({
  title: "Warning!",
  description: "Your action might have unintended consequences.",
  duration: 5000, // optional
  dismissable: false, // optional
  position: "top-center" // optional
});

toast.error({
  title: "Error!",
  description: "Something went wrong.",
  duration: 4000, // optional
  dismissable: true, // optional
  position: "top-left" // optional
});

toast.info({
  title: "Information",
  description: "This is some informational text.",
  duration: 4000, // optional
  dismissable: true, // optional
  position: "top-left" // optional
});

⚙️ Toast Options

| Option | Type | Default | Description | | ------------- | ----------------- | ------------- | ----------------------------------------------------------------- | | title | string \| null | null | Optional title text | | description | string \| null | null | Optional description | | duration | number \| false | 3000 | How long toast stays (in ms). Use false to disable auto-dismiss | | dismissable | boolean | false | Show a close button | | position | string | top-right | One of: top-left, top-center, top-right | | icon | string | Based on type | Override the default icon (see below) |


🌈 Theme Support

  • Automatically follows system theme
  • To force dark mode, add to your <html> tag:
<html data-theme="dark">

🌟 Default Icons

| Type | Icon name | | ------- | -------------------- | | success | check_circle | | warning | exclamation_circle | | error | triangular_error | | info | info_circle | | close | cross |

✅ You can override any icon by passing a custom icon name in the icon option.


📍 Positioning

Toasts can be positioned at:

  • top-left
  • top-center
  • top-right (default)

📦 Toaster Initialization Options

When creating a new Toaster instance, you can pass these options:

| Option | Type | Description | | ------------- | -------- | -------------------------------------------------- | | containerId | string | Optional ID to use for the toast container element | | stack | number | Max number of toasts shown at once (default: 3) |


✅ Features

  • 🚀 Lightweight and fast
  • 🎨 Light/dark/system theme support
  • 📌 Position control
  • 📚 Custom title & description
  • 🧱 Stackable with limit
  • 🧑‍🎨 Icon override
  • ❌ Dismissable option
  • ⚡ No framework needed

📃 License

MIT


🧑‍💻 Author

Made with ❤️ by @dipeshmurmu2005