Create Material Design Inspired Notifications – material-notifications

Category: Javascript , Notification | February 13, 2019
Author: JacobTheEvans
Views Total: 271
Official Page: Go to website
Last Update: February 13, 2019
License: MIT

Preview:

Create Material Design Inspired Notifications – material-notifications

Description:

Yet another JavaScript library used to create Material Design style snackbars, toast messages, banner notifications on the web app.

Can use used as Vanilla JavaScript plugin or React component.

How to use it (Vanilla):

Download and import the vanilla-material-notifications.js library into the document.

<script src="./script.js" type="text/javascript"></script>

Create material snackbars with various types:

snackbar({
  type: 'plain',
  position: 'bottomRight',
  message: 'Hello this is a plain message',
  timeout: 3000
})

snackbar({
  type: 'info',
  position: 'bottomLeft',
  message: 'Hello this is an info message',
  timeout: 3500
})

snackbar({
  type: 'warning',
  position: 'bottomLeft',
  message: 'Hello this is a very very long error message. With extra text',
  timeout: 2000
})

snackbar({
  type: 'alert',
  position: 'bottomLeft',
  message: 'Hello this is an alert message',
  timeout: 2000
})

You Might Be Interested In:


Leave a Reply