Minimal Toast & Snackbar JS Library – LiteNotifyJS

Category: Javascript , Notification | October 2, 2023
Views Total:74 views
Official Page:Go to website
Last Update:October 2, 2023


Minimal Toast & Snackbar JS Library – LiteNotifyJS


LiteNotifyJS is a lightweight yet versatile JavaScript notification library to incorporate Material Design-inspired toast messages and snackbars into your webpage.

It supports various notification types such as Message, Alert, Error, and Confirm. For Confirm notifications, the library provides a callback function to trigger custom logic when the user confirms an action.

How to use it:

1. Download and import the LiteNotifyJS library.

<link rel="stylesheet" href="/dist/litenotify.css" />
<script src="/dist/litenotify.js"></script>

2. Create a basic toast message that slides from the bottom of the webpage.

  msg: "Toast Message Here",

3. Create an alert message that auto-dismisses after 10 seconds.

  msg: "An Alert Message",
  type: "alert",
  time: 5000,

4. Create an error message.

  msg: "An Error Message",
  type: "error",

5. Create a confirmation message.

  msg: "Do you want to redirect the page to CSSScript.Com?",
  type: "confirm",
  callback: () => {
    window.location = '';

You Might Be Interested In:

Leave a Reply