just-toasty
v1.7.0
Published
Simple, customisable toast notifications
Downloads
203
Maintainers
Readme
Install
- Using cdn:
<script src="https://unpkg.com/just-toasty/dist/just-toasty.umd.js"></script>
- Using package manager:
$ npm install just-toasty
# OR
$ yarn add just-toasty
Usage
toasty('Hi') // If no duration is provided, the time will be calculated based on the number of words.
toasty('Hi', 5000)
setTimeout(function() {
toasty('<h1>Whoop</h1>', {styles: {
backgroundColor: '#555'
}})
}, 1000)
setTimeout(function() {
toasty('Hi', {duration: 2000})
}, 3000)
See the example for more information.
Contributing
Contributions are welcome!
- Fork it.
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Or open up a issue.
License
Licensed under the MIT License.