Elegant, lightweight & simple notification library.
Why another notification library?
Existing js notification libraries are either:
Note.js is:
< 2kb
js+cssnpm 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 });