Skip to content

flex

Shorthand utilities for setting flex-grow, flex-shrink, and flex-basis together.

Flexbox & GridTailwind v4 Spec
ISS preview
Iced + ISS preview demonstrating flex
ISS preview for flex
use iss::{flex_tw, box_tw, tw};
let row = flex_tw([
box_tw(icon, tw!("flex-none size-10")),
box_tw(body, tw!("flex-1 min-w-0")),
], tw!("w-full flex-row items-center gap-3"));
Tailwind Class CSS Property / Effect iss::typed Builder
flex-1 flex: 1 1 0%; .flex_1()
flex-auto flex: 1 1 auto; .flex_auto()
flex-initial flex: 0 1 auto; .flex_initial()
flex-none flex: none; .flex_none()
flex-<n> flex: <n>; .flex_num(2)

flex-grow · flex-shrink · flex-basis