> For the complete documentation index, see [llms.txt](https://docs.wem.io/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wem.io/platform/template-editor/layout/alert.md).

# Alert

## ![](/files/0sv9d5gFEmpbk31zvkfm) Introduction

An Alert Container is a basic container with one of the predefined Contexts (success, information, warning or error) to show information with that specific context. These are useful, but not limited, to displaying warning/error messages after validations (for example, validations after submitting a form).

## Properties

<table><thead><tr><th width="249">Properties</th><th>Description</th></tr></thead><tbody><tr><td><em><strong>Style Context</strong></em></td><td>When toggled on, the Panel shows a small arrow to fold or unfold the block panel’s body depending on the condition (see'"Body is expanded when' property).</td></tr><tr><td><em><strong>Show close button</strong></em> </td><td>Optionally, you could show a 'x' button at the top-right corner of the Alert container, which can be used to close the Alert at Runtime. </td></tr><tr><td><em><strong>Icon</strong></em> </td><td>You can add an icon that is displayed in a predefined position (top-left within the container) as explained in the Illustration. </td></tr></tbody></table>

## Illustration

{% hint style="info" %}
This illustration makes use of elements like [Panel](/platform/template-editor/layout/panel.md) and [Conditional](/platform/template-editor/miscellaneous/conditional.md). Refer the linked pages if you would like to learn more about these widgets.&#x20;
{% endhint %}

Let's continue with the EMS use case from the last topic, Panel, where we had constructed the Employees Overview page. Let's now try to display a warning alert message within the Panel when the employee has no Role assigned.&#x20;

This is what we had from the last topic, Panel.&#x20;

<figure><img src="/files/Mfd565XR1xPPkYwzAU0F" alt=""><figcaption></figcaption></figure>

1\. Continuing from the above, add a conditional inside the Panel that checks whether the employee's role is empty.&#x20;

<figure><img src="/files/2G1qALwViMxGeh1a84V2" alt=""><figcaption></figcaption></figure>

2\. Click on the 'Alert' icon in the Template Editor, drag and drop it on the canvas at the place where you would like to insert it.

<figure><img src="/files/StbGI4eSOXH53ceutnuJ" alt=""><figcaption></figcaption></figure>

By default, an Alert of 'warning' context is inserted. &#x20;

2\. Click on the flag icon under 'Icon' in the Properties pane and search for a warning icon.&#x20;

<figure><img src="/files/lCpHKP85BFwyGV8AA0jH" alt=""><figcaption></figcaption></figure>

3\. Select an icon, click 'Ok'.

<figure><img src="/files/kmLZQpVjNYxg5kUNzqO3" alt=""><figcaption></figcaption></figure>

The icon is added to the Alert.&#x20;

4\. Add text to the Alert, either by typing in directly, or using a Label.

<figure><img src="/files/AZqOgQjjd3hgg3srWUv0" alt=""><figcaption></figcaption></figure>

5\. Save the Template Editor and Preview.&#x20;

<figure><img src="/files/I3saF8PuGJjCTSk9UZVL" alt=""><figcaption></figcaption></figure>


---

# 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.wem.io/platform/template-editor/layout/alert.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.
