simple-notification

1.3.0 • Public • Published

Simple Notification

NPM version

Demo

See demo here: Demo

Installation

To install this library, run:

$ npm i simple-notification --save

Copy the content of dist folder app.js and app.css or use other tools how gulp

Or use a CDN option

Dependencies

This library needs the JQuery.

FontAwesome is not required, only if you like using icons.

Methods and options

Available methods

simpleNotify.basic("message", "title", options)
simpleNotify.info("message", "title", options)
simpleNotify.danger("message", "title", options)
simpleNotify.success("message", "title", options)
simpleNotify.warning("message", "title", options)

Default options

var options = {
  type: '',
  title: '',
  content: '',
  lifetime: 5000,
  sticky: false,
  closeTrigger: true,
  iconCls: '',
};
Prop Description
type success, info, warning, danger.
title The title of notification.
content The content of notification.
lifetime The time in milliseconds to destroy the notification.
sticky If true the notification won't be destroyed automatically.
closeTrigger If false the close button won't be displayed.
iconCls Represent the icon class of FontAwesome. For Example 'envelope', it isn't necessary to give the full name like 'fa fa-envelope'.

Development

To compile run:

$ gulp default

To serve local run:

$ npm run dev

License

ISC © Walter Ribeiro

Readme

Keywords

Package Sidebar

Install

npm i simple-notification

Weekly Downloads

25

Version

1.3.0

License

ISC

Last publish

Collaborators

  • walter-ribeiro