just-toasty

Simple, customisable toast notifications


Keywords
toast, notif, notifcation, notification
License
MIT
Install
npm install just-toasty@1.7.0

Documentation


just-toasty

Simple, customisable toast notifications in under 700 bytes

Table of Contents

Table of Contents
  • Install
  • Usage
  • Contribute
  • License
  • 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!

    1. Fork it.
    2. Create your feature branch: git checkout -b my-new-feature
    3. Commit your changes: git commit -am 'Add some feature'
    4. Push to the branch: git push origin my-new-feature
    5. Submit a pull request :D

    Or open up a issue.

    License

    Licensed under the MIT License.