Alerts

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

Examples

Alerts are available for any length of text, as well as an optional dismiss button. For proper styling, use one of the eight required contextual classes (e.g., .alert.primary). For inline dismissal, use the alerts jQuery plugin.

.alert.primary
A simple primary alert—check it out!
.alert.secondary
A simple secondary alert—check it out!
.alert.red
A simple red alert—check it out!
.alert.green
A simple green alert—check it out!
.alert.blue
A simple blue alert—check it out!
.alert.yellow
A simple yellow alert—check it out!
.alert.white
A simple white alert—check it out!
.alert.black
A simple black alert—check it out!
Conveying meaning to assistive technologies

Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (e.g. the visible text), or is included through alternative means, such as additional text hidden with the .sr-only class.

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

.alert.primary .alert-link
A simple primary alert with an example link. Give it a click if you like.
.alert.secondary .alert-link
A simple secondary alert with an example link. Give it a click if you like.
.alert.red .alert-link
A simple red alert with an example link. Give it a click if you like.
.alert.green .alert-link
A simple green alert with an example link. Give it a click if you like.
.alert.blue .alert-link
A simple blue alert with an example link. Give it a click if you like.
.alert.yellow .alert-link
A simple yellow alert with an example link. Give it a click if you like.
.alert.white .alert-link
A simple white alert with an example link. Give it a click if you like.
.alert.black .alert-link
A simple black alert with an example link. Give it a click if you like.