min-h-full: Tailwind CSS Height class

The min-h-screen class ensures an element is at least 100vh (full screen height).


min-h-screen

The min-h-screen class ensures an element is at least 100vh (full screen height). It forces elements like hero sections or landing pages to take up the full viewport height.

Code Example

html
<div class="flex justify-center items-center m-10">
<div class="flex h-screen">
<div class="w-1/3 bg-indigo-950 p-6 min-h-full text-white">
<h2 class="text-lg font-bold">Sidebar</h2>
<ul class="flex flex-col justify-between items-center mt-10 gap-10 font-medium">
<li class=" cursor-pointer hover:bg-gray-500">Home</li>
<li class=" cursor-pointer hover:bg-gray-500">Class</li>
<li class=" cursor-pointer hover:bg-gray-500">Promo</li>
<li class=" cursor-pointer hover:bg-gray-500">Settings</li>
</ul>
</div>
<div class="flex-1 bg-white p-6 rounded ">
<h2 class="text-lg font-bold">Main Content</h2>
<p>This section adapts based on its parent's height.</p>
</div>
</div>
</div>

Preview

Sidebar

  • Home
  • Class
  • Promo
  • Settings

Main Content

This section adapts based on its parent's height.

How to Use

Add the min-h-full class directly to your HTML element:

html
<div class="min-h-full">
<!-- Your content here -->
</div>

Responsive Usage

Use Tailwind's responsive prefixes to apply min-h-full at specific breakpoints:

html
<div class="sm:min-h-full md:min-h-full lg:min-h-full">
Responsive element
</div>
  • sm:min-h-full — applies from 640px and up
  • md:min-h-full — applies from 768px and up
  • lg:min-h-full — applies from 1024px and up

Customization

You can extend or override this utility in your tailwind.config.js. See the Tailwind CSS documentation for details on customizing your theme.

Windframe is an AI visual editor for rapidly building stunning web UIs & websites

Start building stunning web UIs & websites!

Build from scratch or select prebuilt tailwind templates