> For the complete documentation index, see [llms.txt](https://design.mirakl.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://design.mirakl.com/~/changes/DpgERwSwrKIthStzL4D6/components/feedback/alerts.md).

# Alerts

Alerts highlight important information that needs to be communicated quickly to the user.

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FZnEERhbW27cqlHSbOwA1%2FAlerts%20Hero.png?alt=media&amp;token=0199de00-0d28-41b8-8b17-ffdd0408e22b" alt=""><figcaption></figcaption></figure>

## Overview

Alerts are meant to attract users' attention. Use them cautiously, as they can become overwhelming.

## Guidelines

We recommend using only one alert per page and action. It may happen in a few cases to stack several alerts for different messages. Order them in order of importance for users (Warning > Info).

Alerts have to be displayed as close as possible to the element they are related to, preferably before:

* at the top of a page if the information is related to the whole page,
* above a panel, if the information is related to a specific part of the page,
* inside a panel (or a modal) if the information displayed is related to a very specific section.

### When to use

* When important information needs to be communicated to the user.

### When not to use

* To display marketing information or feature promotion.

An alert is always composed of at least an icon and a title. The dismissible feature is optional, displayed with a close icon in the top right corner. Short description (children prop) and Action Button are optional.

{% hint style="warning" %}
**Only one CTA can be displayed in an alert.** It can be used to perform a direct action or redirect users to another page.
{% endhint %}

{% hint style="info" %}
If more documentation is available, add a hyperlink `"Learn more"` at the end of a description.
{% endhint %}

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FtQBcyX3QfWJg2qhf6oYH%2FAlerts%20details.png?alt=media&amp;token=231827d0-117a-4faf-8d0a-a3296cd8d61c" alt=""><figcaption><p>Example of an Alert with a title, description, hyperlink, dismissible icon and CTA</p></figcaption></figure>

#### LoadingAlert <a href="#id-0839d4" id="id-0839d4"></a>

Loading Alert is a specific Alert to be used when users are uploading a file into the platform. This component is a piece of visual information informing users their request is being processed and should wait until its completion.

Loading Alert is an `Info Alert` (blue) with a `spinner icon`

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2F2TZxphnPnWvuPJwuZzSu%2Falerts-loading.gif?alt=media&amp;token=50e90208-4e0e-4775-a1ff-a8bf5817ccef" alt=""><figcaption></figcaption></figure>

### Component variants <a href="#id-037415" id="id-037415"></a>

Alerts convey different levels of severity. In ROMA, we have determined 5 stages of severity: from general information to critical issues.

Each of the 5 levels has its design style:

### &#x20;<a href="#id-037415" id="id-037415"></a>

<table><thead><tr><th width="120">Type</th><th width="96">Color</th><th width="141">Icon</th><th>Info displayed</th></tr></thead><tbody><tr><td>Loading</td><td>Blue</td><td>loading</td><td>Display information about a loading item</td></tr><tr><td>Info</td><td>Blue</td><td>info</td><td>Display general information</td></tr><tr><td>Success</td><td>Green</td><td>check_circle</td><td>Inform about the success of a previously performed action</td></tr><tr><td>Warning</td><td>Yellow</td><td>warning</td><td>Display important information that the user should notice or take action on</td></tr><tr><td>Error</td><td>Red</td><td>error</td><td>Alert about a very critical issue (suspension, errors, etc)</td></tr></tbody></table>

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FQNkMZ8rb5Y2qVjPqdCZ3%2FAlerts%20status.png?alt=media&amp;token=0ba7b5c2-e506-4012-8139-22d32dc28d77" alt=""><figcaption></figcaption></figure>

## Content <a href="#id-61e16c" id="id-61e16c"></a>

Focus on a single piece of information. An alert must focus on a dedicated topic and provide only one main call to action.

#### Title <a href="#id-22895a" id="id-22895a"></a>

The text should be concise and clear so that users understand right away what's going on on the page.  Capitalize only on the first word, with no period at the end.

#### Body <a href="#id-390b4f" id="id-390b4f"></a>

* Info

Add valuable information that may help the user understand what's happening on the page.

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FxWOcyDrDXVjPB8zMFtp8%2FAlerts%20Example.png?alt=media&amp;token=d2cf6a60-6040-4ae0-97fa-596278056d1f" alt=""><figcaption></figcaption></figure>

* Success

Explain the impact of the action and what's going to happen next.

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FVrRXAI1cKTqMnIAhUA7V%2FAlerts%20Example-1.png?alt=media&amp;token=5226e077-b381-48b2-8df4-b98603c903f0" alt=""><figcaption></figcaption></figure>

* Warning and error

Explain how the user can fix what went wrong. You may add a hyperlink to redirect users to the documentation if needed.

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FrlMqP854dOvIvUxptDuV%2FAlerts%20Example-3.png?alt=media&amp;token=563c3508-67ce-42ea-a365-a103de89ac88" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FRafyd4Owdq9JDliuFf1e%2Fimage.png?alt=media&amp;token=6b08e668-6fa7-430d-9cc2-7fc9a588c74a" alt="" width="563"><figcaption></figcaption></figure>

#### Button <a href="#id-537dab" id="id-537dab"></a>

Microcopy should follow [button guidelines](/~/changes/DpgERwSwrKIthStzL4D6/components/actions/buttons.md#content).

## Accessibility <a href="#id-88a089" id="id-88a089"></a>

To communicate the level of severity, we combine a color pattern with a specific icon. **Do not change the icon under any circumstance**, as colors are not perceived the same way by everyone (disabilities, cultures ...).

To reduce mental load and stress, keep labels and descriptions clear and concise.

## Key takeaways <a href="#id-8864e6" id="id-8864e6"></a>

{% hint style="success" %}

* Keep labels and descriptions clear and concise
* Set clear expectations on user's action in the title
* Display only one action per alert
* Add a link to the documentation if more information is available
  {% endhint %}

{% hint style="danger" %}

* Do not change icons
* Do not forget the title (never display only the description and CTA)
* Do not use "Please" or "Thank you" or Latinisms
* Do not overstack alerts
  {% endhint %}


---

# 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://design.mirakl.com/~/changes/DpgERwSwrKIthStzL4D6/components/feedback/alerts.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.
