bootstrap success toast message code example

Example 1: bootstrap toast

<!-- Bootstrap 5 Toasts -->
<div class="toast" role="alert" aria-live="assertive" aria-atomic="true">
   <div class="toast-header">
      <img src="..." class="rounded me-2" alt="..." />
      <strong class="me-auto">Bootstrap</strong>
      <small>11 mins ago</small>
      <button
         type="button"
         class="btn-close"
         data-bs-dismiss="toast"
         aria-label="Close"
      ></button>
   </div>
   <div class="toast-body">Hello, world! This is a toast message.</div>
</div>

Example 2: bootstrap toast

<div class="toast" role="alert" aria-live="assertive" aria-atomic="true">
  <div class="toast-header">
    <img src="..." class="rounded mr-2" alt="...">
    <strong class="mr-auto">Bootstrap</strong>
    <small>11 mins ago</small>
    <button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
      <span aria-hidden="true">×</span>
    </button>
  </div>
  <div class="toast-body">
    Hello, world! This is a toast message.
  </div>
</div>

Tags:

Html Example