0.0.4 • Published 8 years ago

Note.js v0.0.4

Weekly downloads
13
License
MIT
Repository
github
Last release
8 years ago

Note.js

Elegant, lightweight & simple notification library.

Note.js - lightweight javascript notifications Note.js - vanilla js notification library

Why another notification library?

Existing js notification libraries are either:

  • Forcing you to load jQuery, Bootstrap, or something else totally unnecessary
  • Ugly
  • Specific to a certain framework
  • Painful to use with bundlers, such as Webpack

Note.js is:

  • Lightweight - < 2kb js+css
  • Framework-agnostic (use it in React, Angular, Vue, or in plain HTML/JS environment)
  • Compatible with IE10+ and all major browsers

Getting Started

npm install Note.js --save or download a release

// Start by creating an instance. Overriding default config is optional
const note = new Note({}); // Note

Then,

note.success(title, text, config);
note.info(title, text, config);
note.error(title, text, config);
note.warn(title, text, config);
note.notify(title, text, config); // colorless

You can customize the duration, and make the notification sticky.

note.success("Success!", "But I'm not going anywhere..yet", { sticky: true });
note.info("Hey!", "I'm leaving in 5 seconds", { duration: 5 });