Example Component Library
Broken components Broken button Broken quote
Demo Components
Cards (No Flattening)
Layouts
Hero
Info card
Slotted card
Product Pricing Card Dashboard Grid Showcase
Rich button Svg icon User card
Button
Destructive Action Disabled State Dark Theme Preview Dialog Action Layout
Badge
System Status Indicator Dynamic Unread Counter
Alert
Security Outage Alert Dismissible Notification Shell
Quote oneup
Hero Editorial Callout
Promoted App Demo Demo
Demo Extra Button
Demo Nav
Cards
Info card
Elements
Quote oneup Badge
Icon
Accessibility
Generic
Divider Tooltip
Action button Design guidelines
Demo Single Chip Pill
Gallery / Demo Components / Alert Gallery / / Alert
Demo Components /
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 %}

Bigger example

{% alert "info" %}
Sample content
{% 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
{% alert "info" %}
Information: Scheduled system maintenance on Sunday.
{% endalert %}
<div class='alert alert-info info' role='alert'>Sample content</div>