Upgrading from bootstrap 4 to 5.3 and had to migrate the deprecated card-columns
class.
Bootstrap suggests a third party library for masonry (https://getbootstrap.com/docs/5.3/components/card/#masonry).
As @raj-bhatia suggested I also use ngx-masonry
which is the ng wrapper around said library.
The bootstrap example (https://getbootstrap.com/docs/5.3/examples/masonry/) would look in Angular like this:
<ngx-masonry [options]="{ percentPosition: true }" class="row">
<div *ngFor="let col of columns" class="col-sm-6 col-lg-4" ngxMasonryItem>
<div class="card">{{ col }}</div>
</div>
</ngx-masonry>
I noticed that the gutters option did not work well with bootstrap5, so use the gutters class for the row instead (e.g.: class="row g-3"
)