Alert auto close

Bootstrap 5 Alert auto close component

Responsive alert auto close built with Bootstrap 5. Automatically close each alert at different time periods.


Basic example

Example below will close automatically after 3 seconds. Control the time at which the alert fade out specifying the delay in data-mdb-delay="3000".

        
             
      <div data-mdb-alert-init class="alert alert-dismissible fade show" role="alert" data-mdb-color="success" data-mdb-delay="5000" data-mdb-autohide="true">
        <strong>Success!</strong> You have been signed in successfully!
        <button  type="button" data-mdb-button-init data-mdb-ripple-init class="btn-close" data-mdb-dismiss="alert" aria-label="Close"></button>
      </div>