Logo Logo v2.0
Image Description Image Description

No Results

  • Get Support
  • Preview Demo
Logo Logo v2.0
  • Documentation
  • Introduction
  • Getting started
  • Getting Started
  • Gulp
  • Dark Mode New
  • Customization
  • Credits
  • Changelog
  • Design & Graphics
  • Bootstrap Icons
  • Illustrations
  • Components
  • Accordion
  • Alerts
  • Avatars
  • Badge
  • Breadcrumb
  • Buttons
  • Button Group
  • Cards
  • Collapse
  • Column Divider
  • Devices
  • Divider
  • Dropdowns
  • Icons
  • List Group
  • Lists
  • Legend Indicator
  • Modal
  • Offcanvas
  • Page Header
  • Pagination
  • Popovers
  • Progress
  • Profile
  • Shapes
  • Sliding Image
  • Spinners
  • Steps
  • Tab
  • Toasts
  • Tooltips
  • Typography
  • Navbars
  • Navbar
  • Navs
  • Mega Menu
  • Navbar Vertical Aside
  • Scrollspy
  • Tables
  • Tables
  • Datatables
  • Sticky Header
  • Basic forms
  • Basic Forms
  • Checks & Switches
  • Input Group
  • Advanced Forms
  • Advanced Select
  • Datepicker (Flatpickr)
  • Date Range Picker
  • Calendar (Fullcalendar)
  • File Attachments
  • Drag’ n’ Drop File Uploads
  • WYSIWYG Editor
  • Quantity Counter
  • Copy to Clipboard
  • Input Mask
  • Step Forms (Wizards)
  • Add Field
  • Toggle Password
  • Count Characters
  • Form Search
  • Toggle Switch
  • Google reCAPTCHA
  • Charts
  • Chart.js
  • Counter
  • Circles.js (Pie Chart)
  • Others
  • Fullscreen Lightbox
  • Leaflet
  • JSVectorMap
  • SortableJS
  • Sticky Block
  • Go To
  • Utilities
  • Backgrounds
  • Borders
  • Colors
  • Links
  • Position
  • Shadows
  • Sizing
  • Spacing
  • Z-index
  • Opacity

Alerts

See what's new added, changed, fixed, improved or updated in the latest Front versions.

Bootstrap Alerts documentation

Examples

Use .alert-* classes.

  • Preview
  • HTML
This is a primary alert—check it out!
This is a secondary alert—check it out!
This is a success alert—check it out!
This is a danger alert—check it out!
This is a warning alert—check it out!
This is a info alert—check it out!
This is a light alert—check it out!
This is a dark alert—check it out!
              
                <div class="alert alert-primary" role="alert">
                  This is a primary alert—check it out!
                </div>
                <div class="alert alert-secondary" role="alert">
                  This is a secondary alert—check it out!
                </div>
                <div class="alert alert-success" role="alert">
                  This is a success alert—check it out!
                </div>
                <div class="alert alert-danger" role="alert">
                  This is a danger alert—check it out!
                </div>
                <div class="alert alert-warning" role="alert">
                  This is a warning alert—check it out!
                </div>
                <div class="alert alert-info" role="alert">
                  This is a info alert—check it out!
                </div>
                <div class="alert alert-light" role="alert">
                  This is a light alert—check it out!
                </div>
                <div class="alert alert-dark" role="alert">
                  This is a dark alert—check it out!
                </div>
              
            

Soft style

Use .alert-soft-* classes.

  • Preview
  • HTML
This is a soft primary alert—check it out!
This is a soft secondary alert—check it out!
This is a soft success alert—check it out!
This is a soft danger alert—check it out!
This is a soft warning alert—check it out!
This is a soft info alert—check it out!
This is a soft light alert—check it out!
This is a soft dark alert—check it out!
              
                <div class="alert alert-soft-primary" role="alert">
                  This is a soft primary alert—check it out!
                </div>
                <div class="alert alert-soft-secondary" role="alert">
                  This is a soft secondary alert—check it out!
                </div>
                <div class="alert alert-soft-success" role="alert">
                  This is a soft success alert—check it out!
                </div>
                <div class="alert alert-soft-danger" role="alert">
                  This is a soft danger alert—check it out!
                </div>
                <div class="alert alert-soft-warning" role="alert">
                  This is a soft warning alert—check it out!
                </div>
                <div class="alert alert-soft-info" role="alert">
                  This is a soft info alert—check it out!
                </div>
                <div class="alert alert-soft-light" role="alert">
                  This is a soft light alert—check it out!
                </div>
                <div class="alert alert-soft-dark" role="alert">
                  This is a soft dark alert—check it out!
                </div>
              
            

Link color

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

  • Preview
  • HTML
This is a primary alert with an example link. Give it a click if you like.
This is a primary alert with an example link. Give it a click if you like.
              
                <div class="alert alert-primary" role="alert">
                  This is a primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
                </div>
                <div class="alert alert-soft-primary" role="alert">
                  This is a primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
                </div>
              
            

With Icon

  • Preview
  • HTML
Information: Alert with icon
              
                <div class="alert alert-primary" role="alert">
                  <div class="d-flex">
                    <div class="flex-shrink-0">
                      <i class="bi-exclamation-triangle-fill"></i>
                    </div>
                    <div class="flex-grow-1 ms-2">
                      Information: Alert with icon
                    </div>
                  </div>
                </div>
              
            

Dismissing

Use .alert-dismissible class for .alert.

  • Preview
  • HTML
Holy guacamole! You should check in on some of those fields below.
              
                <div class="alert alert-warning alert-dismissible fade show" role="alert">
                  <span class="fw-semi-bold">Holy guacamole!</span> You should check in on some of those fields below.
                  <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                </div>
              
            

Additional content

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

  • Preview
  • HTML

Well done!

Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.


Whenever you need to, be sure to use margin utilities to keep things nice and tidy.

              
                <div class="alert alert-success" role="alert">
                  <h3 class="alert-heading">Well done!</h3>
                  <p>Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.</p>
                  <hr />
                  <p class="mb-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p>
                </div>