# MeasuredSizeAwareModifierNode

Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/MeasuredSizeAwareModifierNode.kt+class:androidx.compose.ui.node.MeasuredSizeAwareModifierNode) Added in [1.11.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.11.0) Common/AllAndroid/JVM
- Cmn

  ```
  interface MeasuredSizeAwareModifierNode : DelegatableNode
  ```
Known direct subclasses [LayoutAwareModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/LayoutAwareModifierNode)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/LayoutAwareModifierNode` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` which receives various callbacks in response to local changes in layout. |

Known indirect subclasses [DragAndDropSourceModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/draganddrop/DragAndDropSourceModifierNode), [DragAndDropTargetModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/draganddrop/DragAndDropTargetModifierNode)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/draganddrop/DragAndDropSourceModifierNode` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` that can be used as a source for platform drag and drop operations. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/draganddrop/DragAndDropTargetModifierNode` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` that can be used as a target for platform drag and drop operations. |

*** ** * ** ***

A `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` which receives a callback with the layout's measured size.

This is the `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` equivalent of `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/OnRemeasuredModifier`.

Example usage:

```kotlin
import androidx.compose.material3.Text
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.onSizeChanged

// 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") },
)
```

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/MeasuredSizeAwareModifierNode#onRemeasured(androidx.compose.ui.unit.IntSize)(size: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize)` This method is called when the layout content is remeasured. | Cmn |

### Inherited functions

From [androidx.compose.ui.node.DelegatableNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/EmptySuper
https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#onDensityChange()()`

Invoked when the density changes for this node.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/EmptySuper
https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#onLayoutDirectionChange()()`

Invoked when the layout direction changes for this node.
Cmn

### Inherited properties

From [androidx.compose.ui.node.DelegatableNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode) `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#node()`

A reference of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` that holds this node's position in the node hierarchy.
Cmn

## Public functions

### onRemeasured

Cmn Added in [1.11.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.11.0)

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

This method is called when the layout content is remeasured. The most common usage is `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/onSizeChanged.modifier#(androidx.compose.ui.Modifier).onSizeChanged(kotlin.Function1)`.