One year ago this month Hans Fjällemark and I released Toastr and are happy to see that developers seem to appreciate its simplicity. It’s now be downloaded on NuGet over 27,000 times. In fact, the recent version was downloaded over 10,000 times the past 2 months! Today we have released version 1.3.0 to github and NuGet.
Toastr is a simple JavaScript toast notification library that is small, easy to use, and extendable. It allows you to create simple toasts with HTML5 and JavaScript like this:
Simply include the files in your HTML page and write a simple line of code like this:
var msg = 'Are you the six fingered man?'; var title = 'Inigo Montoya'; toastr.success(msg, title);
Click the this button to try it yourself.
Get Toastr 1.3.0
You can grab the latest bits from NuGet or github
- Install toastr from NuGet
- Fork toastr on github
What's New in 1.3.0
- Added onFadeIn and onFadeOut callbacks.
toastr.options.onFadeIn = function() { console.log('hello'); };
- Added option
newestOnTop
to show toasts in oldest or newest first order.
toastr.options.newestOnTop = false;
- Fixed margins on full width toasts
- Added LESS file.
- Added min file for JS and CSS
- Added missing vendor prefixes in CSS.
- Various minor bug fixes.
- Added unit tests for new features.
Live Demo
Needs more information? Check out the readme on the github page for details on the simple API. You can also find a link to the live toastr demo on github or you can go directly to the toastr demo from here.
Some of these features came right from pull requests from Toastr users. If you have an idea for Toastr, feel free to contribute and make a pull request. just be sure to also include unit tests to cover any code changes.