Browse documentation

Reference / Flexbox & grid

Flex shrink

Choose which items may get smaller when their preferred widths exceed the available space.

Working example

A shrink factor of zero protects a thumbnail’s width. Allow the adjacent description to wrap in the remaining space.

HTML
<div class="flex max-w-52 items-center gap-3">
  <span class="grid size-12 shrink-0 place-items-center bg-black text-white">M</span>
  <p class="min-w-0 shrink">Monochrome print workshop</p>
</div>

Class reference

ClassCSS declarations
shrinkflex-shrink: 1;
shrink-0flex-shrink: 0;
shrink-2flex-shrink: 2;
shrink-[3]flex-shrink: 3;
View full generated CSS
Compiled CSS
.shrink {
  flex-shrink: 1;
}
.shrink-0 {
  flex-shrink: 0;
}
.shrink-2 {
  flex-shrink: 2;
}
.shrink-\[3\] {
  flex-shrink: 3;
}