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-success).

  1. <w type="alert" class="alert alert-primary">
  2. This is a primary alert—check it out!
  3. </w>
  4. <w type="alert" class="alert alert-secondary">
  5. This is a secondary alert—check it out!
  6. </w>
  7. <w type="alert" class="alert alert-success">
  8. This is a success alert—check it out!
  9. </w>
  10. <w type="alert" class="alert alert-danger">
  11. This is a danger alert—check it out!
  12. </w>
  13. <w type="alert" class="alert alert-warning">
  14. This is a warning alert—check it out!
  15. </w>
  16. <w type="alert" class="alert alert-info">
  17. This is a info alert—check it out!
  18. </w>
  19. <w type="alert" class="alert alert-light">
  20. This is a light alert—check it out!
  21. </w>
  22. <w type="alert" class="alert alert-dark">
  23. This is a dark alert—check it out!
  24. </w>

Dismissing

Add a dismiss button and the .alert-dismissible class, which adds extra padding to the right of the alert and positions the .close button.

On the dismiss button, add the data-dismiss="alert" attribute, which triggers the C functionality.

  1. <w type="alert" class="alert alert-warning alert-dismissible">
  2. <w type="strong">Holy guacamole!</w>
  3. <w type="textview">You should check in on some of those fields below.</w>
  4. <w type="button" class="close" data-dismiss="alert">&#215;</w>
  5. </w>