snackbar
snackbar copied to clipboard
π« Lightweight feedback notifications
snackbar
Lightweight feedback notifications
Install
$ npm install --save snackbar
Usage
-
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!');
API
snackbar.show(message)
message
Type string
snackbar.duration
Time to show snackbar before hiding (default 5000)
Type number
snackbar.gap
Time between sequential snackbars (default 250)
Type number
License
MIT Β© AndrΓ© Ruffert