Skip to content

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>;

Use shrink to allow an item to shrink if needed, and shrink-0 to prevent it.

flex-shrink: Allowing items to shrinkflex-shrink: Allowing items to shrink
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")
}
flex-shrink: Allowing items to shrinkflex-shrink: Allowing items to shrink
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")
}