Vanilla JS toast notification.

Overview

Toasting

Toasting - is a javascript library for notifications. There is no dependencies needed.

Installing

There is no npm or cdn is available yet. by now the only way is download code from folder dist.

  1. Link toasting.css
<link href="./dist/css/toasting.css" rel="stylesheet"/>
  1. Link toasting.js
<script src="./dist/js/toasting.js"></script>
  1. After DOM is loaded, the toasting is available as global variable
    // Displing the default toast with default config.
    var toast = toasting.create(options);

Options

There are the avilable config option for making toast. Only title is required. toast will set to default if config property is not specified.

{
    // `title` is to set as title. This property is required or it will set to default one 'Default Title'.
    title: "this is title",

    // `text` is subtitle.
    text: "this is description.",
    
    // `type` is the toast type, there are 5 type that is available for now:
    // default if this key is not specified, 'success', 'warning', 'error' and 'info'.
    // By specified type, will set the background of toast.
    // You can modify color in src/scss/style/scss file.
    type: "info",

    // Enable toast to hover to pause. this key is true by default.
    isHoverToPause: true,

    // tell toast to hide itself after timeout. this key is true by default.
    autoHide: true,
    
    // Tell if you need to hide progress bar. this key is false by default.
    hideProgressBar: false,

    // set the type of the progress bar. there are 5 type are available by now:
    // default if this key is not specified, 'success', 'warning', 'error', 'info' and 'rainbow'.

    progressBarType: "rainbow",

    // set the timeout in milisecond for toast to hide itself. this key is 4000ms by default.
    timeout: 4000
}

Callback

onHide

Add event listener to run while toast is being close

    var toast = toasting.create(options);
    toast.addEventListener('onHide', e => {
        console.log('This will confole when toast is prepare to hide.');
    });

onHidden

Add event listener to run when toast is completly hidden

    var toast = toasting.create(options);
    toast.addEventListener('onHidden', e => {
        console.log('This will confole when toast is been hidden.');
    });

Methods

hide

Hide toast immediately

    var toast = toasting.create(options);
    toast.hide();
You might also like...

Adds a notification to hydrate yourself!

Adds a notification to hydrate yourself!

Water Break This plugin simply puts a notification in the upper-left of the window. This will alert you to drink some water! Install ipm install water

Sep 24, 2022

Get a desktop notification every time a new correction slot is available for your 42 project.

42_slot_watcher A simple node.js corrections slots watcher for 42, working on Windows - MacOS - Linux. What is this I was bored of having to refresh t

Dec 20, 2022

Simple, cli-first, mobile push notification across systems.

Notify.sh Simple, cli-first, mobile push notification across systems. Install In each folder, run npm install. The expected node version is 14. (Highe

May 20, 2022

JavaScript Alert/Notification System

alertify.js - browser dialogs never looked so good The end of maintenance... at least for now Unfortunately, I will no longer be maintaining alertify.

Dec 22, 2022

Notification handler. KISS, light and library free.

Notification.js Notification.js is a standalone ES6 module that allows you to easily handle several notifications from different types at the same tim

Nov 25, 2020

jQuery quick notification plugin. jQuery плагин быстрых уведомлений

Note: English translation by Google Translate Notific About Description: this is a jQuery plugin that helps you display notifications on your site. Li

Nov 7, 2021

jQuery plugin for a Notification Bar

jquery.peekABar A jQuery plugin for a notification bar with customization options. Important Note We have stopped supporting bower as a package manage

Dec 11, 2022

This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js

This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js. But in most cases, I would recommend you to use something like Express in a production project for productivity purposes.

Jul 19, 2022
Releases(0.1.0)
Owner
Tharith Phon
Tharith Phon
A vanilla JavaScript toast library

Vanilla Toasts (also refered to as vtoast) is a lightweight VanillaJS toast library. It does not require any framework to run. It is inspired from toa

Paper Development 4 Jan 18, 2022
Lightweight and simple notification library in Vanilla JavaScript.

SimpleNotification SimpleNotification is a library to display simple yet customizable notifications. You can stylize text with a simple syntax, add bu

null 14 Dec 11, 2022
✨ Small and Clean JavaScript Toast Notifications

BuzzNotify Small and Clean JavaScript Toast Notifications New version introduces breaking changes! Now the styles come separately and you will have to

R. Eliut 9 Aug 23, 2022
A simple, jQuery free Snackbar (Toast) alert

js-snackbar What is a SnackBar? According to Material Design a Snackbar or Toast provides "brief messages about app processes at the bottom of the scr

Michael Mickelson 43 Jan 5, 2023
EggyJS is a Javascript micro Library for simple, lightweight toast popups focused on being dependency-less, lightweight, quick and efficient.

EggyJS EggyJS is a Javascript micro Library for simple, lightweight toast popups. The goal of this library was to create something that meets the foll

Sam 10 Jan 8, 2023
It's an alert library build with JavaScript. You can replace your traditional JavaScript alert, confirm and toast with the library.

asteroid-alert It's an alert library build with JavaScript. You can replace your traditional JavaScript alert, confirm with the library. It has also e

Khan Md Sagar 4 Mar 12, 2021
Kuldeep 2 Jun 21, 2022
Jquery Plugin for Make easy Toast

Nice Toast JS nice and easy toast for jquery Requirements jQuery Installation NPM npm install nice-toast-js Yarn yarn add nice-toast-js CDN - jsDelivr

Hasan Ahani 4 Jul 26, 2022
Send slack notification with BQ results

bq2slack-github-action Send slack notification with BQ results. How to use Sample github actions workflow yaml name: Run SQL against BQ and notify sla

Data-i Consulting 4 Dec 16, 2022
Manage and monitorize your notification using only your terminal :3

Notifications Monitor Monitor your notifications and get a temporary list of the notifications. Dependencies Node.js (to run the program; by default,

Gabriel Guerra 3 Apr 12, 2022