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

boom-toaster

v1.0.6

Published

A lightweight, beautiful toast notification library for React

Readme

💥 BoomToaster

A lightweight, beautiful toast notification library for React. Zero dependencies (beyond React itself).



Installation

npm install boom-toaster
# or
yarn add boom-toaster
# or
pnpm add boom-toaster

Quick Start

1. Add <BoomToaster /> once at your app root:

// components/toaster-provider.tsx
"use client";
import { BoomToaster } from "boom-toaster";

export default function ToasterProvider() {
  return <BoomToaster position="top-right" />;
}
// app.tsx / layout.tsx
import ToasterProvider from "@/components/toaster-provider";

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>
        <ToasterProvider />
        {children}
      </body>
    </html>
  );
}

2. Call boom anywhere:

import { boom } from "boom-toaster";

boom.success("Saved successfully!");
boom.error("Something went wrong.");
boom.warning("Low disk space.");
boom.info("New update available.");
boom.loading("Uploading file...");

API

<BoomToaster />

| Prop | Type | Default | Description | | ----------------- | --------------- | ------------- | ----------------------------- | | position | ToastPosition | "top-right" | Where toasts appear on screen | | maxToasts | number | 5 | Max visible toasts at once | | defaultDuration | number | 4000 | Auto-dismiss delay in ms |

boom methods

| Method | Description | | --------------------------------- | ---------------------------------------- | | boom.success(message, options?) | Green success toast | | boom.error(message, options?) | Red error toast | | boom.warning(message, options?) | Yellow warning toast | | boom.info(message, options?) | Blue info toast | | boom.loading(message, options?) | Spinner toast (persists until dismissed) | | boom.dismiss(id) | Manually dismiss a toast by id | | boom.promise(promise, messages) | Auto success/error from a Promise |

ToastOptions

{
  id?:          string;          // custom id (useful for promise / loading)
  duration?:    number;          // ms before auto-dismiss. 0 = persist
  position?:    ToastPosition;   // override global position per toast
  description?: string;          // secondary text below the title
  dismissible?: boolean;         // show ✕ button (default: true)
  onDismiss?:   (id) => void;    // callback when dismissed
}

ToastPosition

"top-left" |
  "top-center" |
  "top-right" |
  "bottom-left" |
  "bottom-center" |
  "bottom-right";

Examples

With description

boom.success("Order placed!", {
  description: "Your order #1234 is confirmed.",
});

Persist until manually dismissed

const id = boom.loading("Uploading...", { duration: 0 });
// later:
boom.dismiss(id);

Promise toast

boom.promise(
  fetch("/api/save").then((r) => r.json()),
  {
    loading: "Saving...",
    success: "Saved!",
    error: "Failed to save.",
  },
);

Per-toast position

boom.error("Critical error!", { position: "top-center", duration: 0 });

React hook

import { useBoom } from "boom-toaster";

function MyComponent() {
  const boom = useBoom();
  return <button onClick={() => boom.success("Hello!")}>Click</button>;
}

Multiple positions

You can render multiple <BoomToaster /> for different positions:

<BoomToaster position="top-right" />
<BoomToaster position="bottom-center" />

Each one only renders toasts that were sent to its position.


License

MIT