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
editions-and-impressions-final-proof.pdf
PDF
Keep min-w-0 on the flexible filename so the file type stays in view at narrow widths.
<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
| Class | CSS declarations |
|---|---|
min-w-0 | min-width: 0px; |
min-w-24 | min-width: 6rem; |
min-w-full | min-width: 100%; |
min-w-fit | min-width: fit-content; |
min-w-min | min-width: min-content; |
min-w-[12ch] | min-width: 12ch; |
View full generated 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;
}