> 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

## ![](https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2F3vKSGdsAfseOrSLFMwIf%2FAlert.png?alt=media\&token=8ff7740e-75b7-4639-bc9f-a48602598b1f) 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="https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2FVUdc82IEPizn9r9anJQC%2FScreenshot%202023-02-13%20at%2015.34.48.jpg?alt=media&amp;token=12a6aa38-80e0-4738-a9b2-61270323308d" 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="https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2FoG7sqRd2ncgzo6uQkWze%2FScreenshot%202023-02-13%20at%2015.44.47.jpg?alt=media&amp;token=c6bfdec9-4c5c-433f-8290-d609bda07138" 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="https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2FQxaTirnArTmkwAtuTHPI%2FScreenshot%202023-02-13%20at%2015.46.16.jpg?alt=media&amp;token=6a3eb5a0-c6c6-46a0-a072-f1da04f57b44" 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="https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2FgqEHaidIfPGEWBtAJYPD%2FScreenshot%202023-02-13%20at%2015.46.50.jpg?alt=media&amp;token=557e53d3-1874-4562-a786-bcfe8d057b83" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2FqyOReSVjghaU9ReQROf7%2FScreenshot%202023-02-13%20at%2015.47.19.jpg?alt=media&amp;token=92b2fa5b-923e-457e-92ea-04c3f447cc83" 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="https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2FV1wGMa5hXy2zDqVRxq7k%2FScreenshot%202023-02-13%20at%2015.47.54.jpg?alt=media&amp;token=07032be4-be78-4e2c-8b5f-2aac7486788e" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2F5KRn2oaBBWeAvkG3tYwZ%2FScreenshot%202023-02-13%20at%2015.48.56.jpg?alt=media&amp;token=95992049-9f04-4aad-aa88-1531d0cb2a79" 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 by asking a question.

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

```
GET https://docs.wem.io/platform/template-editor/layout/alert.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.
