- ###### FILES

- Two new item submitted Marketing Manager
  17kb
- 52 Doc file Generator FontEnd Developer
  550kb
- 25 Xls File Uploaded Digital Marketing Manager
  20kb
- Anna Strong Web Designer
  37kb

- ###### MEMBERS

- John Doe UI designer
- Michal Clark FontEnd Developer
- Milena Gibson Digital Marketing
- Anna Strong Web Designer

- ###### PAGES

- error_outline No results found.

##### Toasts

Toasts are content that are not original visible on a page but show up with extra information if needed. The transitions should make the appearance of the toast make sense and not jarring to the user.

#### Toasts

- View
- Html
- JS

To do this, call the toast() function programatically in JavaScript.

This theme provides an easy way for you to send unobtrusive alerts to your users through toasts. These toasts are also placed and sized responsively, try it out by clicking the button below on different device sizes.

Toast!

      <a class="btn toast-basic">Toast!</a>

      M.toast({
        html: 'I am a toast!'
    })

#### Custom HTML

- View
- JS

You can pass in an HTML String as the first argument as well.

Take a look at the example below, where we pass in text as well as a flat button. If you call an external function instead of in-line JavaScript, you will not need to escape quotation marks.

ToastMe! Toast Again!

        var toastHTML = 'I am toast content';
        M.toast({html: toastHTML});

#### Callback

- View
- JS

You can have the toast callback a function when it has been dismissed

Toast!

        M.toast({
          html: 'I am a toast',
          completeCallback: function () {
              alert('Your toast was dismissed')
          }
      })

#### Styling Toasts

- View
- JS

We've added the ability to customize your toasts easily. You can pass in classes as an optional parameter into the toast function.

We've added a rounded class for you, but you can create your own CSS classes and apply them to toasts. Checkout out our full example below.

Round Toast!

      M.toast({html: 'I am a toast!', classes: 'rounded'});

#### Dismiss a Toast Programatically

To remove a specific toast using JavaScript, access the `M_Toast` toast HTML element and call the remove function

      // Get toast DOM Element, get instance, then call remove function
      var toastElement = document.querySelector('.toast');
      var toastInstance = M.Toast.getInstance(toastElement);
      toastInstance.dismiss();

#### Dismiss all Toasts

    M.Toast.dismissAll();

add

- help_outline
- widgets
- today
- mail_outline