---
title: "MeasuredSizeAwareModifierNode"
description: "A [androidx.compose.ui.Modifier.Node] which receives a callback with the layout's measured size.

This is the [androidx.compose.ui.Modifier.Node] equivalent of
[androidx.compose.ui.layout.OnRemeasuredModifier]."
type: "interface"
---

<div class='type'>Interface</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>



```kotlin
interface MeasuredSizeAwareModifierNode : DelegatableNode
```


A `androidx.compose.ui.Modifier.Node` which receives a callback with the layout's measured size.

This is the `androidx.compose.ui.Modifier.Node` equivalent of
`androidx.compose.ui.layout.OnRemeasuredModifier`.


## Functions

```kotlin
fun onRemeasured(size: IntSize)
```


This method is called when the layout content is remeasured. The most common usage is
`onSizeChanged`.



## Code Examples

### OnSizeChangedSample
```kotlin
@Composable
fun OnSizeChangedSample(name: String) {
    // Use onSizeChanged() for diagnostics. Use Layout or SubcomposeLayout if you want
    // to use the size of one component to affect the size of another component.
    Text(
        "Hello $name",
        Modifier.onSizeChanged { size -> println("The size of the Text in pixels is $size") },
    )
}
```

