Open this example in the interactive library
Source code
<div class="demo columns-2 [&>*]:break-inside-avoid [&>*]:block">
<span class="tile">One</span><span class="tile">Two</span
><span class="tile">Three</span>
</div>
Keep each card together in multicolumn flow with Tailwind CSS 4 utilities. The preview uses precompiled styles.
Open this example in the interactive library
<div class="demo columns-2 [&>*]:break-inside-avoid [&>*]:block">
<span class="tile">One</span><span class="tile">Two</span
><span class="tile">Three</span>
</div>