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

reactnotificationtoaster

v1.0.2

Published

A lightweight and customizable notification toaster for React

Readme

React Notification Toaster

A lightweight and customizable notification toaster for React applications.

Installation

npm install reactnotificationtoaster

Usage

1. Import the component and styles

import { Toaster, toast } from 'reactnotificationtoaster';
import 'reactnotificationtoaster/src/App.css';

2. Add the Toaster component to your app

function App() {
  return (
    <div>
      {/* Your app content */}
      <Toaster position="top-right" maxToasts={5} />
    </div>
  );
}

3. Trigger notifications

// Success notification
toast.success('Operation completed successfully!');

// Error notification
toast.error('Something went wrong!');

// Warning notification
toast.warning('Please be careful!');

// Info notification
toast.info('Here is some information');

// Custom notification
toast.custom('Custom message', {
  type: 'default',
  duration: 3000
});

API

Toaster Component Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | position | string | 'top-right' | Position of toaster: 'top-left', 'top-center', 'top-right', 'bottom-left', 'bottom-center', 'bottom-right' | | maxToasts | number | 5 | Maximum number of toasts to display |

Toast Methods

toast.success(message, options)

Display a success notification.

toast.error(message, options)

Display an error notification.

toast.warning(message, options)

Display a warning notification.

toast.info(message, options)

Display an info notification.

toast.custom(message, options)

Display a custom notification.

toast.dismiss(id)

Dismiss a specific toast by ID, or all toasts if no ID provided.

Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | title | string | - | Optional title for the toast | | duration | number | 3000 | Duration in ms (set to 0 for persistent) | | type | string | 'default' | Toast type: 'success', 'error', 'warning', 'info', 'default' |

Examples

// Toast with title
toast.success('Profile updated successfully', {
  title: 'Success'
});

// Toast with custom duration (5 seconds)
toast.info('This will stay for 5 seconds', {
  duration: 5000
});

// Persistent toast (must be dismissed manually)
const id = toast.warning('Please review this carefully', {
  duration: 0
});

// Dismiss specific toast
toast.dismiss(id);

// Dismiss all toasts
toast.dismiss();

License

ISC

Author

Zarrar Hussain Abid