# Alert

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

## Overview

An alert overlay component that displays content in a floating panel that can be positioned at different corners of the screen. Supports auto-close functionality with visual progress indicator, customizable appearance, and responsive behavior.

## Common use cases

* Use for temporary notifications, messages, or calls-to-action
* Keep content concise as the alert has limited space
* Consider accessibility when choosing colors and auto-close timing
* Display important announcements or promotional messages
* Provide user feedback for actions

## Compatible blocks

The following blocks can be nested within this block:

* [Container](/slab/content/blocks/layout/container.md) (for alert content)

## Block settings

### General

| Setting                | Description                                                            | Options                   |
| ---------------------- | ---------------------------------------------------------------------- | ------------------------- |
| Show advanced settings | Reveals 8 advanced options including show close button, type, and more | Checkbox (default: false) |

### Content

| Setting             | Description                                                             | Options                                                                                                                                                                                               |
| ------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Overlay preset      | Select a preset overlay ID or use a custom one                          | <p>• Account<br>• Search<br>• Menu<br>• Primary cart<br>• Alternative cart<br>• Age verification<br>• Form response<br>• Discount<br>• Error<br>• Quick buy<br>• Quick edit<br>• Custom (default)</p> |
| Overlay ID          | Custom identifier for the overlay (used to trigger it programmatically) | <p>Text input<br><br>Visible when overlay preset is "Custom"</p>                                                                                                                                      |
| Show close button   | Displays a close button in the alert                                    | <p>Checkbox (default: false)<br><br>Visible when <strong>Show advanced settings</strong> is on</p>                                                                                                    |
| Enable auto close   | Automatically closes the alert after a set duration                     | <p>Checkbox (default: false)<br><br>Visible when <strong>Show advanced settings</strong> is on</p>                                                                                                    |
| Auto close duration | Time before the alert automatically closes                              | <p>1 - 10 s (default: 3)<br><br>Visible when enable auto close is true</p><p><br><br>Visible when <strong>Enable auto close</strong> is on and <strong>Show advanced settings</strong> is on</p>      |

### Color

| Setting            | Description                                              | Options                                                                                                                                                                                                                                                                   |
| ------------------ | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Type               | Custom scheme vs preset surface colors                   | <p>• Custom<br>• Base (default)</p><p><br><br>Visible when <strong>Show advanced settings</strong> is on and <strong>Enable inheritance</strong> is off</p>                                                                                                               |
| Color scheme       | Background and text pairing                              | <p>Color scheme picker<br><br>Visible when type is <strong>Custom</strong>, <strong>Show advanced settings</strong> is on, and <strong>Enable inheritance</strong> is off</p>                                                                                             |
| Color scheme       | Background and text pairing                              | <p>• Body background (default)<br>• Body foreground<br>• Accent 1–3<br>• Shade 1–3<br>• Blur<br>• Transparent</p><p><br><br>Visible when type is <strong>Base</strong>, <strong>Show advanced settings</strong> is on, and <strong>Enable inheritance</strong> is off</p> |
| Border color       | Alert border                                             | <p>• Subtle (default)<br>• Strong<br>• None</p><p><br><br>Visible when <strong>Show advanced settings</strong> is on, type is <strong>Base</strong>, and <strong>Enable inheritance</strong> is off</p>                                                                   |
| Enable inheritance | Inherit colors from the closest parent with a set scheme | <p>Checkbox (default: false)<br><br>Visible when <strong>Show advanced settings</strong> is on</p>                                                                                                                                                                        |

### Layout

| Setting             | Description                                     | Options                            |
| ------------------- | ----------------------------------------------- | ---------------------------------- |
| Horizontal position | Position of the alert along the horizontal axis | <p>• Left<br>• Right (default)</p> |
| Vertical position   | Position of the alert along the vertical axis   | <p>• Top (default)<br>• Bottom</p> |

### Display

| Setting    | Description                        | Options                                                                                                                            |
| ---------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| Visibility | Controls when the block is visible | <p>• All (default)<br>• Mobile only<br>• Desktop only</p><p><br><br>Visible when <strong>Show advanced settings</strong> is on</p> |


---

# Agent Instructions: 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:

```
GET https://help.brickspacelab.com/slab/content/blocks/overlays/alert.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
