crunchy-toast

🍞 Crunchy Toast - React Toast Notifications Library

Crunchy Toast is a lightweight, customizable, and easy-to-use React library for displaying toast notifications in your web applications.

npm version npm downloads

Installation

You can install the crunchy-toast library via npm:

npm install crunchy-toast

Usage

To use Crunchy Toast in your React application, follow these steps:

  1. Import the showToast function from the library:
import showToast from 'crunchy-toast';
  1. Call showToast to display a toast notification:
showToast('This is a sample toast message', 'success', 3000);

The showToast function accepts three parameters:

Examples

Here are some examples of how to use Crunchy Toast:

Basic Toast

showToast('This is a basic toast message', 'info');

Success Toast

showToast('Success! Your action was successful', 'success', 2000);

Warning Toast

showToast('Warning: Proceed with caution', 'warning', 4000);

Alert Toast

showToast('Alert! An error occurred', 'alert', 6000);

Contributing

We welcome contributions to the Crunchy Toast library! If you find a bug or have an enhancement in mind, please open an issue or submit a pull request on our Crunchy Toast.