> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/experience-cloud/properties-panel/interactions/show-toast.md).

# Show Toast

Show a brief overlaid notification to confirm a user's action or give immediate feedback, without navigating away from the current page.

## Overview

Use a toast message to confirm a user's action and provide feedback. Toasts are overlaid notifications that stack horizontally and can be dismissed by the user.

Use a toast for one of these types of responses:

* **`Info:`** Inform users that their actions have triggered a process, and they may have to wait for completion before proceeding.
* **`Success:`** Confirm a successful or completed action.
* **`Warning:`** Warning toasts inform users of potential issues related to their actions and guide them to prevent future problems.
* **`Error:`** Communicate an issue preventing a user from completing their current action and can be fixed within their current flow.

In general, use a toast interaction in response to user action. To decide whether you should use Toasts or another type of messaging, jump to Toasts vs. Alert Modal vs. Confirm interaction.

<figure><img src="https://2929066058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2Fgit-blob-7191735cb6cfd2415a688defc326b40e5d48d937%2FShow%20Toast%20Avonni%20Components.webp?alt=media" alt=""><figcaption></figcaption></figure>

## Configuration

<table><thead><tr><th width="214">Property</th><th>Description</th></tr></thead><tbody><tr><td><strong>Title</strong></td><td>Text that will be displayed in the header.</td></tr><tr><td><strong>Message</strong></td><td>Main content message for your alert box.</td></tr><tr><td><strong>Variant</strong></td><td>Semantic style of the toast: <code>Info</code> (the default), <code>Success</code>, <code>Warning</code> or <code>Error</code>.</td></tr><tr><td><strong>Mode</strong></td><td>Determines how persistent the toast is. Choose between <code>Dismissible</code> (the default), <code>Pester</code> and <code>Sticky</code>.</td></tr></tbody></table>

### Mode definition

* #### Dismissible

  * **Description**: Toasts with the **`Dismissible`** mode appears for a short period and then automatically fades away. Users also have the option to dismiss the toast earlier by clicking on it or the close button.
  * **Usage**: Use this mode for informative messages that are not critical to the user's workflow, allowing them to disappear without requiring user action, thus maintaining a smooth user experience.

  #### Pester

  * **Description**: The **`Pester`** mode keeps the toast on-screen for a longer duration compared to **`Dismissible`**, but it will eventually close after a set time. It does not require immediate attention and allows the user to continue their work, but it persists longer to ensure the user has ample time to read the message.
  * **Usage**: This mode is best for notifications that hold moderate importance, where you want to ensure that the user has seen the message but it is not urgent enough to interrupt their current task.

  #### Sticky

  * **Description**: Toasts set to **`Sticky`** mode will remain on the screen indefinitely until the user takes action to dismiss them. They will not fade away automatically.
  * **Usage**: Reserve **`Sticky`** mode for critical alerts that require user attention or action before proceeding. These messages are crucial and should stay in view until the user acknowledges them, ensuring the message has been noticed.

  <br>

## Example

Imagine a community page where members save a preference from an Avonni Button:

1. On the button's **On Click**, set the interaction **Type** to **Show Toast**.
2. Set the **Title** to "Preferences saved" and leave the **Message** empty — the title alone carries it.
3. Pick the `Success` **Variant** so the toast reads as a confirmation.
4. Leave **Mode** on `Dismissible` so the toast fades on its own without the member having to close it.

Chain it after the interaction that does the work — for example as the **On Finish** step of an **Open Flow Dialog** — so the toast only fires once the save actually succeeds.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.avonnicomponents.com/experience-cloud/properties-panel/interactions/show-toast.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
