All Projects → kamranahmedse → Jquery Toast Plugin

kamranahmedse / Jquery Toast Plugin

Highly customizable jquery plugin to show toast messages

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Jquery Toast Plugin

Razor.SweetAlert2
A Razor class library for interacting with SweetAlert2
Stars: ✭ 98 (-92.08%)
Mutual labels:  notifications, toast
Toastify Js
Pure JavaScript library for better notification messages
Stars: ✭ 570 (-53.92%)
Mutual labels:  notifications, toast
Ftindicator
A light wight UI package contains local notification, progress HUD, toast, with blur effect, elegant API and themes support.
Stars: ✭ 292 (-76.39%)
Mutual labels:  notifications, toast
tall-toasts
A Toast notification library for the Laravel TALL stack. You can push notifications from the backend or frontend to render customizable toasts with almost zero footprint on the published CSS/JS 🔥🚀
Stars: ✭ 296 (-76.07%)
Mutual labels:  notifications, toast
Notie
🔔 a clean and simple notification, input, and selection suite for javascript, with no dependencies
Stars: ✭ 6,170 (+398.79%)
Mutual labels:  notifications, toast
ngx-toasta
Simple and clean Toast notification library for AngularX (Angular2 and beyond)
Stars: ✭ 20 (-98.38%)
Mutual labels:  notifications, toast
Cogo Toast
Beautiful, Zero Configuration, Toast Messages for React. Only ~ 4kb gzip, with styles and icons
Stars: ✭ 557 (-54.97%)
Mutual labels:  notifications, toast
Toasted Notes
simple, flexible toast notifications for react
Stars: ✭ 241 (-80.52%)
Mutual labels:  notifications, toast
Vue Snotify
Vuejs 2 Notification Center
Stars: ✭ 755 (-38.97%)
Mutual labels:  notifications, toast
Vue Toastification
Vue notifications made easy!
Stars: ✭ 747 (-39.61%)
Mutual labels:  notifications, toast
SteamAchievementNotifier
Steam Achievement Notifier is an Electron application that shows a customisable notification when you unlock any Steam Achievement! It uses the Steam Web API to track achievement stats in real time, and displays an achievement summary within the notification.
Stars: ✭ 77 (-93.78%)
Mutual labels:  notifications, toast
Burnttoast
Module for creating and displaying Toast Notifications on Microsoft Windows 10.
Stars: ✭ 796 (-35.65%)
Mutual labels:  notifications, toast
Sentinel
👀 Native notifications for League of Legends
Stars: ✭ 38 (-96.93%)
Mutual labels:  notifications, toast
php-flasher
🔔 Flasher is a powerful and flexible flash notifications system for PHP, Laravel, Symfony
Stars: ✭ 68 (-94.5%)
Mutual labels:  notifications, toast
vue-dk-toast
Lightweight toast-notification plugin for Vue 3 🍞
Stars: ✭ 23 (-98.14%)
Mutual labels:  notifications, toast
Ng Snotify
Angular 2+ Notification Center
Stars: ✭ 304 (-75.42%)
Mutual labels:  notifications, toast
Sweetalert2
A beautiful, responsive, highly customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes. Zero dependencies.
Stars: ✭ 13,929 (+1026.03%)
Mutual labels:  notifications, toast
Overlay support
a flutter toast and notification library
Stars: ✭ 232 (-81.24%)
Mutual labels:  notifications, toast
Gsmessages
A simple style messages/notifications, in Swift.
Stars: ✭ 595 (-51.9%)
Mutual labels:  notifications, toast
Laravel Notify
Flexible Flash notifications for Laravel
Stars: ✭ 787 (-36.38%)
Mutual labels:  notifications, toast

Jquery Toast Plugin

A plugin to show highly customizable notifications to the user.

How to use

  • You can install the plugin via Bower:

    bower install jquery-toast-plugin
    

    or via npm

    npm install jquery-toast-plugin
    

    Or directly download the repository and place the content of dist wherever you can access them.

  • Include the CSS and JS files.

  • Simply do $.toast('Toast message to be shown') Of course it would be the world's simplest toast message but believe me you can do a lot more with the options.

Demo

For some quick demos and a detailed documentation accompanied by the demos for each of the available options can be accessed through http://kamranahmed.info/toast

Quick usage examples

Simple textual toast

// Non sticky version
$.toast("Lorem ipsum dolor sit amet, consectetur adipisicing elit. Hic, consequuntur doloremque eveniet eius eaque dicta repudiandae illo ullam. Minima itaque sint magnam dolorum asperiores repudiandae dignissimos expedita, voluptatum vitae velit.")
// Sticky version
$.toast({
  text : "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Hic, consequuntur doloremque eveniet eius eaque dicta repudiandae illo ullam. Minima itaque sint magnam dolorum asperiores repudiandae dignissimos expedita, voluptatum vitae velit.",
  hideAfter : false
})

Toast using HTML as a text

// Non sticky
$.toast("Let's test some HTML stuff... <a href='#'>github</a>")
// sticky
$.toast({
  text : "<strong>Remember!</strong> You can <span style='font-weight: bold; color:red;' class='horribly-styled'>always</span> introduce your own × HTML and <span style='font-size: 18px;'>CSS</span> in the toast.",
  hideAfter : false
})

Unordered list elements as the text of toast using array

// Non sticky version
$.toast(["Ubuntu : One of it's kind", "Sublime Text : Productivity unleashed", "HeidiSQL : Just love it", "Github : Just Lovely"])
// Sticky version
$.toast({
  text : ["Ubuntu : One of it's kind", "Sublime Text : Productivity unleashed", "HeidiSQL : Just love it", "Github : Just Lovely"],
  hideAfter : false
})

Changing the animations

$.toast({ 
  text : "Let's test some HTML stuff... <a href='#'>github</a>", 
  showHideTransition : 'slide'  // It can be plain, fade or slide
})

Changing the formatting

$.toast({ 
  text : "Let's test some HTML stuff... <a href='#'>github</a>", 
  showHideTransition : 'slide',  // It can be plain, fade or slide
  bgColor : 'blue',              // Background color for toast
  textColor : '#eee',            // text color
  allowToastClose : false,       // Show the close button or not
  hideAfter : 5000,              // `false` to make it sticky or time in miliseconds to hide after
  stack : 5,                     // `fakse` to show one stack at a time count showing the number of toasts that can be shown at once
  textAlign : 'left',            // Alignment of text i.e. left, right, center
  position : 'bottom-left'       // bottom-left or bottom-right or bottom-center or top-left or top-right or top-center or mid-center or an object representing the left, right, top, bottom values to position the toast on page
})

Resetting the toast

var myToast = $.toast('Some toast that needs to be removed.');
myToast.reset(); // remove the toast "Some toast that needs to be removed"

What if I want to reset all the toasts at once? You may ask. Well in that case, you can do the following:

$.toast().reset('all');

Updating the toast Suppose, you had shown some toast upon the page, a sticky toast for example and now you want to update the toast. You can do the following

var myToast = $.toast({
  text : 'Some toast that needs to show the success message after the ajax call.',
  hideAfter : false,
  bgColor : '#E01A31'
});

window.setTimeout(function(){
  myToast.update({
    text : '<strong>Updated after a few seconds</strong>',
    bgColor : '#23B65D'
  });
}, 5000);

To learn more about how to use and customize it, head to http://kamranahmed.info/toast. Also you can find a customizer there that will let you modify the look and feel of the toast however you like it.


You can simply download the repo or if you are in rush the minified CSS or non-minified CSS can be found and minified JS and non minified JS can also be found.

Features

  • Show different types of toasts i.e. informational, warning, errors and success
  • Custom toast background color and text color
  • Ability to hack the CSS to add your own thing
  • Text can be provided in the form of
    • Array (It's elements will be changed to an un ordered list)
    • Simple text
    • HTML
  • Events support i.e. beforeHide, afterHidden, beforeShow, afterShown
  • Fade and Slide show/hide transitions support (More to come)
  • Supports showing the loader for the toast
  • You can position the toast, wherever you want there is support for top-left, top-right bottom-left and bottom-right, top-center, bottom-center and mid-center ...sighs! That's a whole lot of options, isn't it? No, you say. Ok then here is the most exciting thing, you can also introduce your own positioning just by passing a simple js object containing { top: - , bottom: -, left: -, right: - }
  • Ability to add sticky toast
  • Optional stack length can be defined (i.e. maximum number of toasts that can be shown at once)

Please report any bugs or features you would like added.

Copyright

MIT © Kamran Ahmed

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].