Skip to main content

Height Utilities

NuvoUI provides a comprehensive set of utilities for controlling the height of elements, from fixed dimensions to percentage-based and content-aware sizing.

Fixed Height Utilities

Apply specific height values from the spacing scale:

Available Fixed Height Classes

Height utilities are generated from the VAR.$spacings map, including values like:

ClassSizePixels
.h-000px
.h-10.25rem4px
.h-20.5rem8px
.h-41rem16px
.h-82rem32px
.h-123rem48px
.h-164rem64px
.h-246rem96px
.h-328rem128px
.h-4812rem192px
.h-6416rem256px

Percentage Height Utilities

Set height as a percentage of the parent container:

Available Percentage Height Classes

Height percentage utilities are generated from the VAR.$percentages list:

ClassDescription
.h-0pSets height to 0%
.h-5pSets height to 5%
.h-10pSets height to 10%
.h-25pSets height to 25%
.h-33pSets height to 33%
.h-50pSets height to 50%
.h-66pSets height to 66%
.h-75pSets height to 75%
.h-90pSets height to 90%
.h-100pSets height to 100%

Special Height Values

Apply common height values:

Content-Based Height Values

Control height based on content:

Available Special Height Classes

ClassCSS PropertyDescription
.h-autoheight: auto;Default height, based on content
.h-fullheight: 100%;Full height of container
.h-screenheight: 100dvh;Full viewport height (dynamic viewport height)
.h-minheight: min-content;Height based on minimum content size
.h-maxheight: max-content;Height based on maximum content size
.h-fitheight: fit-content;Height based on fit-content algorithm

Min-Height and Max-Height Utilities

Control minimum and maximum height constraints:

Available Min-Height and Max-Height Classes

  • Min-height classes: Start with min-h- (e.g., min-h-full, min-h-32, min-h-50p)
  • Max-height classes: Start with max-h- (e.g., max-h-full, max-h-64, max-h-75p)

Responsive Height Utilities

Change height at different breakpoints using the @breakpoint notation:

Interactive Height States

Change height on hover or with group interactions:

Common UI Patterns

Full-Height Layout

Card with Fixed Height

Responsive Height Element

Image with Aspect Ratio

Height Utilities Reference Table

Fixed Height Classes

Height utilities are generated from the VAR.$spacings map:

ClassSizePixels
.h-000px
.h-10.25rem4px
.h-20.5rem8px
.h-30.75rem12px
.h-41rem16px
.h-51.25rem20px
.h-61.5rem24px
.h-82rem32px
.h-102.5rem40px
.h-123rem48px
.h-164rem64px
.h-205rem80px
.h-246rem96px
.h-328rem128px
.h-4010rem160px
.h-4812rem192px
.h-5614rem224px
.h-6416rem256px

Percentage Height Classes

Height percentage utilities are generated from the VAR.$percentages list:

ClassDescription
.h-0pSets height to 0%
.h-5pSets height to 5%
.h-10pSets height to 10%
.h-15pSets height to 15%
.h-20pSets height to 20%
.h-25pSets height to 25%
.h-30pSets height to 30%
.h-33pSets height to 33%
.h-40pSets height to 40%
.h-50pSets height to 50%
.h-60pSets height to 60%
.h-66pSets height to 66%
.h-70pSets height to 70%
.h-75pSets height to 75%
.h-80pSets height to 80%
.h-90pSets height to 90%
.h-100pSets height to 100%

Special Height Classes

ClassCSS PropertyDescription
.h-autoheight: auto;Default height, based on content
.h-fullheight: 100%;Full height of container
.h-screenheight: 100dvh;Full viewport height (using dynamic viewport height)
.h-minheight: min-content;Height based on minimum content size
.h-maxheight: max-content;Height based on maximum content size
.h-fitheight: fit-content;Height based on fit-content algorithm

Min-Height Classes

ClassDescription
.min-h-0Sets min-height to 0
.min-h-fullSets min-height to 100%
.min-h-{size}Sets min-height to a specific size from spacing scale
.min-h-{percentage}pSets min-height to a specific percentage

Max-Height Classes

ClassDescription
.max-h-0Sets max-height to 0
.max-h-fullSets max-height to 100%
.max-h-{size}Sets max-height to a specific size from spacing scale
.max-h-{percentage}pSets max-height to a specific percentage

SCSS Mixins

NuvoUI provides a comprehensive set of height-related mixins for use in your SCSS:

Height Mixins

MixinDescriptionParameters
@include height($value)Sets height using units$value: height value with units
@include height-percent($i)Sets height as percentage$i: percentage as number
@include min-height($value)Sets minimum height using units$value: height value with units
@include min-height-percent($i)Sets minimum height as percentage$i: percentage as number
@include max-height($value)Sets maximum height using units$value: height value with units
@include max-height-percent($i)Sets maximum height as percentage$i: percentage as number

Special Height Mixins

MixinDescriptionCSS Output
@include h-autoSets height to autoheight: auto;
@include h-fullSets height to 100%height: 100%;
@include h-screenSets height to viewport heightheight: 100dvh;
@include h-maxSets height to max-contentheight: max-content;
@include h-minSets height to min-contentheight: min-content;
@include h-fitSets height to fit-contentheight: fit-content;
@include min-h-fullSets min-height to 100%min-height: 100%;
@include max-h-fullSets max-height to 100%max-height: 100%;

Example SCSS Usage