// Materialize.toast(message, displayLength, className, completeCallback); Materialize.toast('I am a toast!', 4000) // 4000 is the duration of the toastOne way to add this into your application is to add this as an onclick event to a button
<a class="btn" onclick="Materialize.toast('I am a toast', 4000)">Toast!</a>
<a class="waves-effect waves-light btn" onclick="Materialize.toast('<span>Item Deleted</span><a class="btn-flat yellow-text" href="#!"">Undo<a>', 5000)">Toast!</a>
<a class="btn" onclick="Materialize.toast('I am a toast', 4000,'',function(){alert('Your toast was dismissed')})">Toast!</a>
Materialize.toast('I am a toast!', 3000, 'rounded') // 'rounded' is the class I'm applying to the toast