Author: | cooljith91112 |
---|---|
Views Total: | 185 views |
Official Page: | Go to website |
Last Update: | December 27, 2017 |
License: | MIT |
Preview:

Description:
Vanilla-Yo-Notification(VYN) is a modern vanilla JavaScript library to create growl- and toast-style notifications on the web app.
How to use it:
Installation:
# NPM $ npm install vanilla-yo-notification --save
Import the Vanilla-Yo-Notification.
// ES 6 import VYN from 'vanilla-yo-notification'; // CommonJS: const VYN = require('vanilla-yo-notification');
Initialize the vanilla-yo-notification.
var vyn = new VYN();
Create a new notification with custom title, footer, and content.
vyn.show({ title: 'Notification Title', content: 'Notification message', footer: 'Notification footer' });
Override the default timeout. By default, the notification message will automatically dismiss after 3000ms.
vyn.show({ timeout: 3000 });
Override the default position of the notification message.
vyn.show({ position: ['bottom', 'right'] });
Specify the notification type.
vyn.show({ type: 'success', // or warning, error });