Documentation
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.omatically.
Note it's specifically only available in the "dark" theme.
Example usage::
{% alert "warning" %}
Your session will expire in 5 minutes.
{% endalert %}
Usage
Minimal example
{% alert "info" %}
Information: Scheduled system maintenance on Sunday.
{% endalert %}
Qualified tag usage
{% ui__alert "info" %}
Information: Scheduled system maintenance on Sunday.
{% endui__alert %}
Parameters
| Name | Type | Required | Default | Choices | Description |
|---|---|---|---|---|---|
level
|
str
|
Yes |
info
|
info
,
success
,
warning
,
error
|
Alert level modifier |
Sandbox