Alert
Alert
Ex. <div className="alert alert-primary" role="alert"> A simple primary alert—check it out! </div>
A simple primary alert—check it out!
A simple secondary alert—check it out!
A simple success alert—check it out!
A simple danger alert—check it out!
A simple warning alert—check it out!
A simple info alert—check it out!
Alert with Icons
Ex. <div className="alert bg-soft-primary fw-medium" role="alert"> <MdInfoOutline className="fs-5 align-middle me-1"/> An example alert with an icon </div>
An example alert with an icon
An example success alert with an icon
An example warning alert with an icon
An example danger alert with an icon
Alert Links
Ex. <div className="alert alert-primary" role="alert"> A simple primary alert with <Link href="#" className="alert-link"></Link>. </div>
A simple primary alert with an link.
A simple secondary alert with an link.
A simple success alert with an link.
A simple danger alert with an link.
A simple warning alert with an link.
A simple info alert with an link.
Additional Content
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.
Dismissing Alert
Ex.
<div className="alert alert-success alert-dismissible fade show" role="alert">
<strong>Well done!</strong> You successfully read this important alert message.
<button type="button" className="btn-close" onClick={()=>setShow(false)}> </button>
</div>
<strong>Well done!</strong> You successfully read this important alert message.
<button type="button" className="btn-close" onClick={()=>setShow(false)}> </button>
</div>
Well done! You successfully read this important alert message.
Heads up! This alert needs your attention, but it's not super important.
Holy guacamole! You should check in on some of those fields below.
Oh snap! Change a few things up and try submitting again.
Advanced Alert
Ex.
<div className="alert alert-primary alert-pills" role="alert">
<span className="badge rounded-pill bg-danger"> New </span>
<span className="alert-content"> A Modern primary alert—check it out! </span>
</div>
<span className="badge rounded-pill bg-danger"> New </span>
<span className="alert-content"> A Modern primary alert—check it out! </span>
</div>
New A Modern primary alert—check it out!
New A Modern danger alert—check it out!
Advanced Outline Alert
Ex.
<div className="alert alert-outline-primary alert-pills" role="alert">
<span className="badge rounded-pill bg-danger"> New </span>
<span className="alert-content"> A Modern primary alert—check it out! </span>
</div>
<span className="badge rounded-pill bg-danger"> New </span>
<span className="alert-content"> A Modern primary alert—check it out! </span>
</div>
New A Modern primary alert—check it out!
New A Modern danger alert—check it out!