Lightweight feedback notifications
$ npm install --save snackbar
-
First of all make sure to import the snackbar.scss file into your project.
-
Use the snackbar.js API
const snackbar = require('snackbar');
// Optional configuration
snackbar.duration = 5000;
snackbar.gap = 250;
// Show the snackbar or add it to the queue
snackbar.show('Ohai!');Type string
Time to show snackbar before hiding (default 5000)
Type number
Time between sequential snackbars (default 250)
Type number
MIT © André Ruffert