Skip to content

Sizing

Min-Height

Utilities for setting the minimum height of an element.

Quick reference

ClassDescription
min-h-0min-height: 0rem
min-h-1min-height: 0.1rem
min-h-2min-height: 0.2rem
min-h-4min-height: 0.4rem
min-h-6min-height: 0.6rem
min-h-8min-height: 0.8rem
min-h-10min-height: 1rem
min-h-12min-height: 1.2rem
min-h-14min-height: 1.4rem
min-h-16min-height: 1.6rem
min-h-20min-height: 2rem
min-h-24min-height: 2.4rem
min-h-28min-height: 2.8rem
min-h-32min-height: 3.2rem
min-h-40min-height: 4rem
min-h-44min-height: 4.4rem
min-h-48min-height: 4.8rem
min-h-56min-height: 5.6rem
min-h-64min-height: 6.4rem
min-h-80min-height: 8rem
min-h-96min-height: 9.6rem
min-h-112min-height: 11.2rem
min-h-128min-height: 12.8rem
min-h-144min-height: 14.4rem
min-h-fullmin-height: 100%
min-h-minmin-height: min-content
min-h-maxmin-height: max-content
min-h-fitmin-height: fit-content

Basic usage

Setting the minimum height

Set the minimum height of an element using the min-h-0, min-h-full, or min-h-screen utilities.

html
<div class="h-48">
  <div class="h-24 min-h-full">
    <!-- ... -->
  </div>
</div>

Arbitrary values

If you need to use a one-off min-height value that doesn't make sense to include in your theme, use square brackets to generate a property on the fly using any arbitrary value.

html
<div class="min-h-[50]">
  <!-- ... -->
</div>

Applying conditionally

Breakpoints and media queries

You can also use variant modifiers to target media queries like responsive breakpoints, dark mode, prefers-reduced-motion, and more. For example, use md:min-h-full to apply the min-h-full utility at only medium screen sizes and above.

html
<div class="h-24 min-h-0 md:min-h-full">
  <!-- ... -->
</div>

Released under the Apache 2.0 License.