Alerts Bootstrap 5Free
Dismissible Alert: a hand-crafted, open-source Bootstrap 5 alert. HTML included, ready to copy.
2.2k views654 downloads
gosnippets.com/preview/dismissible-alert
Source Code
1<div class="container py-4">
2 <div class="alert alert-success alert-dismissible fade show d-flex align-items-center gap-2" role="alert">
3 <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-check-circle-fill flex-shrink-0" viewBox="0 0 16 16">
4 <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>
5 </svg>
6 <div><strong>Success!</strong> Your changes have been saved successfully.</div>
7 <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
8 </div>
9 <div class="alert alert-danger alert-dismissible fade show d-flex align-items-center gap-2" role="alert">
10 <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-x-circle-fill flex-shrink-0" viewBox="0 0 16 16">
11 <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"/>
12 </svg>
13 <div><strong>Error!</strong> Something went wrong. Please try again.</div>
14 <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
15 </div>
16 <div class="alert alert-warning alert-dismissible fade show d-flex align-items-center gap-2" role="alert">
17 <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-exclamation-triangle-fill flex-shrink-0" viewBox="0 0 16 16">
18 <path d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/>
19 </svg>
20 <div><strong>Warning!</strong> Your session is about to expire in 5 minutes.</div>
21 <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
22 </div>
23</div>More Alerts snippets

Bootstrap 5 Notification Page Design snippets example
Add a alert to your UI with Bootstrap 5 Notification Page Design snippets example. Free Bootstrap 5 code — HTML & CSS ready to copy, MIT licensed.
AlertsView →

Bootstrap 5 Notification UI Design snippets with navbar
Bootstrap 5 Notification UI Design snippets with navbar — a free Bootstrap 5 alert snippet.
AlertsView →

Custom Toast notification with Progress Bar
Add a alert to your UI with Custom Toast notification with Progress Bar. Free Bootstrap 5 code — HTML, CSS & JS ready to copy, MIT licensed.
AlertsView →
Comments(0)
No comments yet — be the first to start the discussion.
Sign in to join the conversation.