Open this example in the interactive library
Source code
<div class="demo max-h-[24dvh] overflow-auto">
<p style="height: 16rem">
This panel is capped at 24% of the preview height.
</p>
</div>
Size content from viewport height with Tailwind CSS 4 utilities. The preview uses precompiled styles.
Open this example in the interactive library
<div class="demo max-h-[24dvh] overflow-auto">
<p style="height: 16rem">
This panel is capped at 24% of the preview height.
</p>
</div>