Skip to content

Burhan-Hasan/Notification-Bar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 

Repository files navigation

Notification Bar

VIEW DEMO

image

Useage

There're three types of notification

1. Success

    Notify.Success( message [, autoCloseDuration ]);

2. Warning

    Notify.Warning( message [, autoCloseDuration ]);

3. Error

    Notify.Error( message [, autoCloseDuration ]);

Settings

To change the settings, you need to set a options value to the property "Settings" of Notify object.

For example

Notify.Settings = {
                sounds: {
                    success: 'sounds/success,\ warning/5.mp3',
                    warning: 'sounds/success,\ warning/2.mp3',
                    error: 'sounds/errors/1.mp3'
                },
                animDuration: {
                    success: 8000,
                    warning: 8000,
                    error: 0
                }
            };

You can set also one option only. In this case, the default value for sounds will not be deleted.

Notify.Settings = {
                animDuration: {
                    success: 8000,
                    warning: 8000,
                    error: 0
                }
            };

If the duration of the animation is set to 0, then this notification will not closing automatically.

If you want to turn off the sounds then set to the property soundsOff to true

Notify.Settings = {
                soundsOff: false,
                animDuration: {
                    success: 8000,
                    warning: 8000,
                    error: 8000
                }
            };

About

Simple Notification Library In Vanilla Js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published