@Deveodk/vue-toastr

A easy to use toastr plugin inspired by CodeSeven/toastr made without jquery with pure vue.js
Demo
See a functioning demo deveo demo site
Installation
npm install --save @deveodk/vue-toastr
Usage
Bundler (Webpack, Rollup)
// You need a specific loader for CSS files like https://github.com/webpack/css-loader// If you would like custom styling of the toastr the css file can be replaced Vue
Browser
<!-- From CDN -->
Configuration
The toastr defaults can be configured in the following way
Available positions:
'toast-top-right''toast-bottom-right''toast-bottom-left''toast-top-left''toast-top-full-width''toast-bottom-full-width''toast-top-center''toast-bottom-center'
Available types:
'success''error''info''warning'
Vue
Usage
The $toastr
prototype hook and how to use it.
// Make a success toastrthis
// Make a error toastrthis
// Make a warning toastrthis
// Make a info toastrthis
// Make a toastr with custom propertiesthis
example
// Using toastr in real world application<link rel="stylesheet" href="/@deveodk/vue-toastr/dist/vue-toastr.css"></link><script src="/@deveodk/vue-toastr/dist/vue-toastr.js"></script><script> el: 'body' { this } methods: { this } </script>
Special thanks
A special thanks to s4l1h for creating the original package. About 30% of the source code is forked from vue-toastr