Explain Dialogs in Materialize CSS
Dialogs in Materialize CSS provide users additional information to users if needed by them. These are directly not visible on the web-page. The dialog transitions are related to the information that is required at that point of time. Materialize provides various methods to show dialogs.
Materialize.toast(string, time, styleClass,callback);
- string: It is the string that needs to be displayed in the dialog.
- time: It is the time for what message string would be shown.
- style class: This is to add various styles.
- callback: This callback is a method to be called once the toast is discharged.
<link rel = “stylesheet” href = “https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css”>
<script src = “https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js”></script>
Example: The below example shows the implementation of dialogs in Materialize CSS.