Toast

Toast or snackbar component is used to display short messages to the user that disappears after a few seconds.

Elixir offers one toast - a Simple Toast which is dark themed and appears in the bottom left corner.

Simple Toast

A simple toast consists of a toast text and accompanying action buttons such as a text or icon button.

To generate a simple toast, use the base class snackbar.

Can't send photo. Retry in 5 seconds.

Toast Demo

Can't send photo. Retry in 5 seconds.

Copy the code below to use a snackbar/ toast component.

Copy the below code to use the logic for closing the snackbar when the button is clicked.