# Snackbar

Using **Snackbar** , you could have feedback on  an operation. Snackbar  shows a brief message at the bottom of the screen, above all other elements. Only one can be displayed at a time. Snackbar disappear after user interaction.

Snackbar includes an event-block called AfterAction. It will be automatically triggered when Snackbar action is clicked. This block contains a parameter called "action". It can be used to determine type action that user selected. For example, we can use if-then-else, to check user's response as below:

![](https://3777451846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L93-jOwVwLojc0B0kcn%2F-LGqUsceW7RMEL2o1Ytf%2F-LGqWj27wI0F2m0Q6hfb%2Fimage.png?alt=media\&token=54b0ab0b-089b-4c2e-a2d3-0dcf6c6cfec1)

**Creating Snackbar.** You can create a Snackbar using the following block, in message you should add one-message and up to two actions. The message will appear on left-side and the actions will display on right side. If you want to have only one-action, just plug an empty text block into socket.

![](https://3777451846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L93-jOwVwLojc0B0kcn%2F-LGqDPLCFai_ID9_KqYN%2F-LGqET3RSH2sFggu8x3D%2Fimage.png?alt=media\&token=52d1f577-8deb-4a78-8180-ebd22815e09a)

**Opening Snackbar.** Use block below to determine if Snackbar is open or not

![](https://3777451846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L93-jOwVwLojc0B0kcn%2F-LGqDPLCFai_ID9_KqYN%2F-LGqFWPKdJqjoqOOe4IB%2Fimage.png?alt=media\&token=6a73dccf-a41b-4974-96cf-d09066f7b465)

**Closing Snackbar.** Use block below to force closing of Snackbar.&#x20;

![](https://3777451846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L93-jOwVwLojc0B0kcn%2F-LGqDPLCFai_ID9_KqYN%2F-LGqFmau7R-DKCPZdfge%2Fimage.png?alt=media\&token=df7a78c5-bc9c-4eb2-b93c-197177ee6c19)

Image below shows how Snackbar looks when 2 actions are provided. Note: For this example, we used Snackbar.TextColor to change the default color:

![](https://3777451846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L93-jOwVwLojc0B0kcn%2F-LGqUsceW7RMEL2o1Ytf%2F-LGqYn_tLmQWlshUTpOs%2Fimage.png?alt=media\&token=e6c3b2cf-c2b7-4723-a90c-e03cf51001cc)

![](https://3777451846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L93-jOwVwLojc0B0kcn%2F-LGqUsceW7RMEL2o1Ytf%2F-LGqYQHvXeiQnd2yIS7w%2Fimage.png?alt=media\&token=31ffa993-a9c2-4c1d-a375-f8646eb19676)
