Easy SnackbarsJS

lightweight library for adding snackbars

Demo

/* basic */
EasySnackbars.open('Snackbar example');

/* with custom class */
EasySnackbars.open('Snackbar example', {class:'error'});

/* manually closable */
EasySnackbars.open('Snackbar example', {class:'success', closable:true});

/* with custom button */
EasySnackbars.open('Snackbar example', {closable:true, btnLabel:'Action', btnCallback:function(){alert('hello!');}});

Installation


Documentation

easy-snackbars object provides a method to open a snackbar:


Shorthand methods

For better readibility, settings parameter can be shortened:


License

This project is released under MIT license.