> For the complete documentation index, see [llms.txt](https://docs.heisenware.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.heisenware.com/app-builder/build-frontend/widgets/display-widgets/toast.md).

# Toast

The toast widget displays temporary, timed notification messages at specified positions on the screen. It visualizes alert text strings or detailed event error objects triggered by backend logic in your Apps.

<figure><img src="/files/rCs5BqZs0OsFhZFEtZ3E" alt="" width="365"><figcaption></figcaption></figure>

## Data binding

### Function output or modifier to widget

| **Property** | **Description**                                                                                  | **Type**         |
| ------------ | ------------------------------------------------------------------------------------------------ | ---------------- |
| `message`    | Supplies the text string or structured object block to be broadcast as a temporary notification. | string \| object |

### Data formats

The `message` property accepts either a flat string or a structured object to dynamically append cause diagnostics to the notification framework.

**Plain text message** A standalone string printed directly within the notification body: `"Operation completed successfully."`

**Structured message object** An object containing explicit `message` and optional `cause` properties. If a `cause` is provided, the widget appends it to the display layout automatically as `${message}, because: ${cause}`:

```json
{
  "message": "Database write failed",
  "cause": "Connection timeout"
}
```

<figure><img src="/files/tiVE1X2RPkDxON6t34fy" alt="" width="285"><figcaption></figcaption></figure>

## Configuration

Set the widget's defaults in the settings panel.

<div align="center"><figure><img src="/files/LQEp6bnwoHrpUDr8ugO4" alt="" width="96"><figcaption><p>Toast widget in build mode</p></figcaption></figure></div>

### General settings

| **Property**  | **Label**         | **Description**                                                                                                                                                           | **Type** |
| ------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `type`        | Notification type | Sets the notification alert category style (options include `info`, `warning`, `error`, or `success`). Visual color schemes are managed globally within the Theme Editor. | string   |
| `displayTime` | Display time      | Sets the duration in milliseconds that the notification stays visible on screen before automatically fading out. Defaults to `3000` (3 seconds).                          | integer  |
| `position`    | Position          | Sets the display anchor placement region on the screen viewport (such as top right, top center, top left, bottom right, bottom center, bottom left).                      | string   |

<figure><img src="/files/uSjLCNdCpch0m2W3mlZk" alt="" width="343"><figcaption><p>Toast types in the default theme colors</p></figcaption></figure>

## Tips and tricks

{% hint style="info" %}

#### Message stacking and mobile viewport scaling

When multiple backend parameters trigger the same toast widget simultaneously, the individual notifications stack on top of each other in the same position. To maintain absolute layout clarity, stagger your upstream trigger event timings or instantiate separate toast widgets.

On mobile phone viewports, the widget automatically ignores external structural parameters and optimizes its dimensions to fill the width of the screen minus 32 pixels.
{% endhint %}

## Video demo

{% embed url="<https://www.youtube.com/watch?v=2tz0Kj0uNbY>" %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.heisenware.com/app-builder/build-frontend/widgets/display-widgets/toast.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
