Toasts provide brief notifications. The component is also
known as a snackbar.
The toast is used to show alerts on top of an overlay. The
toast will close itself when the close button is clicked, or
after a timeout — the default is 2 seconds. The toast
component is used to give feedback to users after an action
has taken place.
- In order to view the code you need to visit using a device with larger screen.
You can add this HTML code and Javascript code to get a toast in your website. You can click on the "SHOW TOAST" button for live demo.
You need to put this HTML code at the bottom just before closing the <body> tag.