Alerts

Alerts communicate short, important information to the user, without interrupting their flow.

Elixir offers the following range of alerts - Simple Alerts, and Alerts with Close Button.

Simple alerts

To generate a simple alert use the base class alert. There are 5 types of themed alerts - Primary, Secondary, Success, Warning, and Error alerts.

To generate a themed simple alert, use any of the following theme class along with the base class- alert-primary, alert-secondary, alert-success, alert-warning, and alert-error.

This is a primary alert

This is an secondary alert

This is a success alert

This is a warning alert

This is an error alert

Paste the code below to use simple alerts with different variations.

Simple alerts with Close Button

These are simple alerts with a close icon which removes the alert when you click it.

To generate an alert with close icon, add the supporting class alert-close to the simple alert and within the alert, a button container with class icon-close.

Primary alert with close icon

Secondary alert with close icon

Success alert with close icon

Warning alert with close icon

Error alert with close icon

Paste the code below to use alerts with close icon.

Paste the code below for the javascript logic to close alerts when the close button is clicked.