Alert
Description
A dismissable alert banner that wraps arbitrary content.
Demonstrates a BlockComponent with a StrParam(css_class=True) — the
level is automatically injected into the root element's class list.
Note it's specifically only available in the "dark" theme.
Example usage:
{% alert "warning" %}
Your session will expire in 5 minutes.
{% endalert %}
Usage
Information Notice
{% alert "info" %}
Information: Scheduled system maintenance on Sunday.
{% endalert %}
All parameters
{% alert "info" %}
Sample content
{% endalert %}
Qualified tag usage
{% ui__alert "info" %}
Information: Scheduled system maintenance on Sunday.
{% endui__alert %}
Parameters
| Name | Type | Requirement | Default | Choices | Description |
|---|---|---|---|---|---|
level
|
str
|
Required |
info
|
info
success
warning
error
|
Alert level modifier |
Select variant preset
Background colour
Viewport width
Zoom level
{% alert "info" %}
Information: Scheduled system maintenance on Sunday.
{% endalert %}
<div class='alert alert-info info' role='alert'>Sample content</div>