Skip to content
Commitwise
Menu

Intrinsic measurement (Compose)

Asking a composable how big it would need to be, before measuring it, so siblings can be sized to each other.

Definition

Compose measures each child only once per layout pass. Intrinsics such as IntrinsicSize.Min let a parent query children's minimum or maximum size first, for layouts like a row of cards that are all as tall as the tallest one. They cost an extra traversal but avoid illegal double measurement.

In practice

Row(Modifier.height(IntrinsicSize.Min)) with fillMaxHeight() children makes every card match the tallest.

Learn it in context

Lessons that use this term.

Related terms

Esc

Type to search the whole site.