Check out this code snippet:
<!-- Expand buttons -->
<div>
<a class="btn btn-primary" data-toggle="collapse" href="#collapseExample"
aria-expanded="false" aria-controls="collapseExample"> Link with
href </a>
<button class="btn btn-primary" type="button" data-toggle="collapse"
data-target="#collapseExample" aria-expanded="false"
aria-controls="collapseExample"> Button with data-target
</button>
</div>
<!-- / Expand buttons -->
<!-- Expandable element -->
<div class="collapse" id="collapseExample">
<div class="mt-3"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam vel ullamcorper est, vitae auctor nisi. Mauris vel neque odio. Proin non leo eu eros tincidunt tristique at eget quam.
</div>
</div>
<!-- / Expandable element -->
This code is based on Material Bootstrap Design using jQuery 3.5.1 and Bootsrap 4.5.0 downloaded through the MDB installation package.