Provides contextual feedback messages for typical user actions with the handful of available and flexible alert messages.

Contents

Usage

Examples

Alerts are available for any length of text, as well as an optional dismiss button. For proper styling, use one of the four required contextual classes (e.g., .alert-success). For inline dismissal, use the dismiss property.

Use the .alert-link utility class to quickly provide matching colored links within any alert.

Additional content

Alerts can also contain additional HTML elements like headings and paragraphs.

Dismissing

Alerts have dismiss option. Enabling it will show close button to the right of the alert.

Dynamic html

Sometimes you will need to show dynamically generated html in alerts, here is how you can make it. And don't forget to sanitize your html.

Dismiss on timeout

You can simply set timeout in milliseconds to dismissOnTimeout property to create self closable alerts.

Global styling

You can add additional types of alerts globally.

Component level styling

You can add additional types of alerts directly to containing component

Configuring defaults

It is possible to override default alert config partially or completely.

API Reference