Overview
Use height utilities to control the vertical size of elements. These utilities work with percentages, viewport units, and auto values to create full-height layouts and consistent component sizing.Height Utilities
Height Properties
.h-full | 100% | height: 100%; | Full height |
.h-auto | Auto | height: auto; | Auto height |
.h-screen | 100vh | height: 100vh; | Full viewport height |
Min Height Utilities
Min Height Properties
.min-h-screen | 100vh | min-height: 100vh; | Full viewport height |
.min-h-full | 100% | min-height: 100%; | Full height |
Full Height
Use.h-full to make an element take up 100% of its parent container’s height.
Common Use Cases
- Full-height sidebars
- Container elements that need to fill parent
- Nested layouts
- Flex containers
Auto Height
Use.h-auto to let the browser calculate the height based on the element’s content.
Common Use Cases
- Content containers
- Cards with variable content
- Elements that should size to content
- Default behavior for most elements
Screen Height
Use.h-screen to make an element take up 100% of the viewport height (100vh).
Common Use Cases
- Full-screen hero sections
- Landing pages
- Full-viewport layouts
- Modal overlays
Min Height Screen
Use.min-h-screen to ensure an element is at least the full viewport height, but can grow taller if content requires it.
Common Use Cases
- Page layouts that need full height
- Content areas that should fill viewport
- Landing pages with variable content
- Main content areas
Min Height Full
Use.min-h-full to ensure an element is at least 100% of its parent’s height.
Height Examples
Full-Height Layout
Centered Full-Screen Content
Page with Minimum Height
Full-Height Sidebar
Best Practices
1
Use Screen Height for Full Views
Use
.h-screen for full-viewport layouts like hero sections and landing pages.2
Use Min Height for Pages
Use
.min-h-screen for page layouts that should fill the viewport but can grow taller.3
Combine with Flexbox
Use height utilities with flexbox for full-height layouts and vertical centering.
4
Consider Overflow
Always consider overflow behavior when using fixed heights, especially with scrollable content.

