Skip to content

Sizing

Utilities for controlling width, height, and min/max sizes.

Width

Classwidth
w-00
w-2525%
w-5050%
w-7575%
w-100100%
w-autoauto
w-fitfit-content
w-minmin-content
w-maxmax-content
w-screen100vw

Height

Classheight
h-00
h-2525%
h-5050%
h-7575%
h-100100%
h-autoauto
h-fitfit-content
h-minmin-content
h-maxmax-content
h-screen100vh

Min sizes

ClassPropertyValue
min-w-0min-width0
min-w-fullmin-width100%
min-h-0min-height0
min-h-fullmin-height100%
min-h-screenmin-height100vh

Max sizes

ClassPropertyValue
max-w-fullmax-width100%
max-w-screenmax-width100vw
max-w-nonemax-widthnone
max-h-fullmax-height100%
max-h-screenmax-height100vh
max-h-nonemax-heightnone

Arbitrary values (JIT)

The utils-jit package allows arbitrary sizes:

html
<div class="w-[320px]">Width 320px</div>
<div class="h-[200px]">Height 200px</div>
<div class="w-[50%] h-[calc(100vh-64px)]">Computed sizes</div>

Examples

html
<!-- Full container width -->
<div class="w-100">100% width</div>

<!-- Constrained centered layout -->
<div class="w-[960px] max-w-100 mx-auto pa-4">
  Page content
</div>

<!-- Full-screen section -->
<section class="w-screen min-h-screen d-flex items-center justify-center">
  Full-screen block
</section>