<div th:fragment="modal (id, title, size, bodyId)">
  <div class="modal fade" th:id="${id}" tabindex="-1" aria-hidden="true">
    <div th:class="'modal-dialog ' + ${size}">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title" th:text="#{${title}}">Título</h5>
          <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Cerrar"></button>
        </div>
        <div class="modal-body" th:id="${bodyId}">
        </div>
      </div>
    </div>
  </div>
</div>