icon

Notify.js
Total Downloads Latest Stable Version License Last commit

Download Star Follow @dacoto

Notification generator

Notification example

    let options = {
        title: 'Notification title',
        message: 'Notification message',
        icon: 'fas fa-home',
    };
    let type = 'primary';

    var notification = new Notify(options, type);

    notification.open();
    notification.close();

Notification Params

Options

Props Default value Note Type Required
title Notification title string X
message Notification body text string X
icon notify-icon notify-icon-primary Class of notification icon, similar to this:
<i class="notify-icon notify-icon-primary"></i>
string
link Link at the end of the notification (see link table) array
width 420 Width in pixels of the notification integer
duration 0 The amount of time in milliseconds before closing the notification. integer
autoOpen true Open the notification when instantiate it boolean
onOpen Callback for the open event function
onClose Callback for the hide event function

Link

Props Note Type Required
linkHref Link url url X
linkClass Link class string X
linkText Link text string X

Type

Prop Color Icon
primary #4d9aff primary
success #59d9a4 primary
warning #ffc400 primary
danger #ff542e primary

Notification Methods

Name Note
open() Opens the notification
close() Closes the notification

License

MIT