Example Component Library
Demo Components
Card
Layouts Hero
Info card Slotted card
Alert Badge Button Quote oneup Rich button User card
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 StrCSSClassParam — the level value is injected as a CSS modifier class automatically.

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" %}
Sample content
{% endalert %}

Bigger example

{% alert "info" %}
Sample content
{% endalert %}

Qualified tag usage

{% ui__alert "info" %}
Sample content
{% endui__alert %}

Parameters

Name Type Required Default Choices Description
level str Yes info info , success , warning , error Severity level — controls the colour scheme.
Sandbox