Logo v4.3.1
Image Description

No Results

  • Get Support
  • Preview Demo
Logo v4.3.1
  • Docs
  • Snippets
  • Documentation
  • Introduction
  • Getting started
  • Getting Started
  • Gulp
  • Customization
  • Credits
  • Changelog
  • Design & Graphics
  • Bootstrap Icons
  • Duotone Icons
  • Illustrations
  • Components
  • Accordion
  • Alerts
  • Avatars
  • Badge
  • Breadcrumb
  • Buttons
  • Cards
  • Collapse
  • Column Divider
  • Devices
  • Divider
  • Dropdowns
  • Icons
  • List Group
  • Lists
  • Legend Indicator
  • Modal
  • Offcanvas
  • Page Header
  • Pagination
  • Popovers
  • Progress
  • Profile
  • Shapes
  • Spinners
  • Steps
  • Tab
  • Tables
  • Text Highlight
  • Toasts
  • Tooltips
  • Typography
  • Navbars
  • Navbar
  • Navs
  • Mega Menu
  • Scrollspy
  • Basic forms
  • Basic Forms
  • Checks & Switches
  • Input Group
  • Advanced Forms
  • Advanced Select
  • File Attachments
  • Drag’ n’ Drop File Uploads
  • WYSIWYG Editor
  • Quantity Counter
  • Input Mask
  • Step Forms (Wizards)
  • Range Slider (noUiSlider)
  • Add Field
  • Toggle Password
  • Count Characters
  • Toggle Switch
  • Toggle State
  • Switch
  • Media
  • Fullscreen Lightbox
  • Video Background
  • Video Player
  • Swiper
  • Others
  • Maps (Leaflet)
  • Chart.js
  • Circles.js (Pie Chart)
  • Sticky Block
  • Countdown
  • Sorting (Shuffle.js)
  • Go To
  • Show Animation
  • Typed.js
  • Utilities
  • Backgrounds
  • Borders
  • Colors
  • Links
  • Position
  • Rotations
  • Shadows
  • Sizing
  • Spacing
  • Z-index

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-semibold">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>