JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://code.jquery.com/jquery-3.4.1.slim.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.bundle.min.js"></script>
<div class="container">
  <div class="row">
    <div class="col-3">
      <div class="imagetab-grid">
        <a data-bs-toggle="modal" data-bs-target="#modalImage2"><img class="gridContainerImage" src="https://images.unsplash.com/photo-1564754943164-e83c08469116?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8NXx8dmVydGljYWx8ZW58MHx8MHx8&w=1000&q=80" data-caption="" alt=""></a>
      </div>
    </div>
  </div>
</div>


<div class="modal fade" id="modalImage2" tabindex="-1" aria-labelledby="allImage2" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h2 class="modal-title w-100 text-dark" id="allImage2">image title</h2>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">
        <img class="img-fluid" src="https://images.unsplash.com/photo-1564754943164-e83c08469116?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8NXx8dmVydGljYWx8ZW58MHx8MHx8&w=1000&q=80" alt="">
        <p class="modalText text-dark text-center mt-2">image description</p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
</div>

CSS

.imagetab-grid {
  box-sizing: border-box;
  width: 100%;
  padding: 10px;
  float: left;
}

.imagetab-grid:hover{
  cursor: pointer;
}

.imagetab-grid img {
  width: 100%;
  border-radius: 10px;
}

.modal-title {
  color: black;
}

.modal-content{
  max-height: 85vh;
}

.modal-content>.modal-body {
  max-height: 100%;
}