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 🙏

© 2025 – Pkg Stats / Ryan Hefner

inaipi-toast

v1.0.84

Published

A simple toast notification library for React

Readme

inaipi-toast

inaipi-toast is a simple and customizable toast notification library for React applications. It allows you to easily display success, warning, and error messages in a variety of positions.

Installation

To install inaipi-toast, run the following command:

npm install inaipi-toast --legacy-peer-deps

Usage

Import the Library

To use the inaipi-toast library, import it into your React component like this:

import { toast } from 'inaipi-toast';

Example

Here is a basic example of how to use the toast notifications in your React component:

import { toast } from 'inaipi-toast';
import React from 'react';

const App = () => {
  // Handler functions for each type of toast
  const showSuccessToast = () => {
    toast.success("Success", "This is a success message!", { position: "bottom-left" });
  };

  const showWarningToast = () => {
    toast.warning("Warning", "This is a warning message!", { position: "top-left" });
  };

  const showErrorToast = () => {
    toast.error("Error", "This is an error message!");
  };

  return (
    <div style={{ padding: '20px' }}>
      <h2>Toast Notifications</h2>

      {/* Button to trigger success toast */}
      <button onClick={showSuccessToast} style={{ margin: '10px', padding: '10px' }}>
        Show Success Toast
      </button>

      {/* Button to trigger warning toast */}
      <button onClick={showWarningToast} style={{ margin: '10px', padding: '10px' }}>
        Show Warning Toast
      </button>

      {/* Button to trigger error toast */}
      <button onClick={showErrorToast} style={{ margin: '10px', padding: '10px' }}>
        Show Error Toast
      </button>
    </div>
  );
};

export default App;

Toast Types

inaipi-toast supports the following types of toast notifications:

  • Success: For success messages
    toast.success("Success", "This is a success message!", { position: "bottom-left" });
  • Warning: For warning messages
    toast.warning("Warning", "This is a warning message!", { position: "top-left" });
  • Error: For error messages
    toast.error("Error", "This is an error message!");

Options

You can customize the position of your toast using the position option. The available positions are:

  • "top-left"
  • "top-right"
  • "bottom-left"
  • "bottom-right"

Example:

toast.success("Success", "This is a success message!", { position: "top-center" });

Customization

inaipi-toast is designed to be flexible, allowing you to customize the appearance and behavior as needed. You can customize things like the duration of the toast, animation styles, and more by modifying the options object.

License

inaipi-toast is licensed under the MIT License.