Browse documentation

Reference / Sizing

Min width

Set a lower bound on an element’s width. A zero minimum lets a flex child shrink below the intrinsic width of its text.

Working example

Keep min-w-0 on the flexible filename so the file type stays in view at narrow widths.

HTML
<div class="flex max-w-64 items-center gap-2 border p-2">
  <span class="min-w-0 flex-1 truncate">editions-and-impressions-final-proof.pdf</span>
  <span class="shrink-0 border px-1 text-xs">PDF</span>
</div>

Class reference

ClassCSS declarations
min-w-0min-width: 0px;
min-w-24min-width: 6rem;
min-w-fullmin-width: 100%;
min-w-fitmin-width: fit-content;
min-w-minmin-width: min-content;
min-w-[12ch]min-width: 12ch;
View full generated CSS
Compiled CSS
.min-w-0 {
  min-width: 0px;
}
.min-w-24 {
  min-width: 6rem;
}
.min-w-\[12ch\] {
  min-width: 12ch;
}
.min-w-fit {
  min-width: fit-content;
}
.min-w-full {
  min-width: 100%;
}
.min-w-min {
  min-width: min-content;
}