flex-shrink
Utilities for controlling how flex items shrink.
| Class | Effect |
|---|---|
shrink |
flex-shrink: 1; |
shrink-<number> |
flex-shrink: <number>; |
shrink-[<value>] |
flex-shrink: <value>; |
Examples
Section titled “Examples”Allowing items to shrink
Section titled “Allowing items to shrink”Use shrink to allow an item to shrink if needed, and shrink-0 to prevent it.


if ui.div("flex gap-4") { tile("01", "h-16 w-14 flex-none") tile("02", "h-16 w-64 shrink") tile("03", "h-16 w-14 flex-none")}

if ui.div("flex gap-4") { tile("01", "h-16 flex-1") tile("02", "h-16 w-64 shrink-0") tile("03", "h-16 flex-1")}