# LayoutBoundsHolder

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/layout/LayoutBoundsHolder.kt+class:androidx.compose.ui.layout.LayoutBoundsHolder) Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.9.0) Common/AllAndroid/JVM
- Cmn

  ```
  class LayoutBoundsHolder
  ```

*** ** * ** ***

An object which holds on to a (potentially) mutating `https://developer.android.com/reference/kotlin/androidx/compose/ui/spatial/RelativeLayoutBounds` of a specific node. This is meant to be used alongside the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/layoutBounds.modifier#(androidx.compose.ui.Modifier).layoutBounds(androidx.compose.ui.layout.LayoutBoundsHolder)` modifier and `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/onVisibilityChanged.modifier#(androidx.compose.ui.Modifier).onVisibilityChanged(kotlin.Long,kotlin.Float,androidx.compose.ui.layout.LayoutBoundsHolder,kotlin.Function1)` modifier in situations where you want to understand he visibility of a node with respect to a specific viewport instead of with the window.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/layoutBounds.modifier#(androidx.compose.ui.Modifier).layoutBounds(androidx.compose.ui.layout.LayoutBoundsHolder)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/onVisibilityChanged.modifier#(androidx.compose.ui.Modifier).onVisibilityChanged(kotlin.Long,kotlin.Float,androidx.compose.ui.layout.LayoutBoundsHolder,kotlin.Function1)` |   |

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutBoundsHolder#LayoutBoundsHolder()()` | Cmn |

| ### Public properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/spatial/RelativeLayoutBounds?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutBoundsHolder#bounds()` The bounds of the node this holder is referencing. | Cmn |

## Public constructors

### LayoutBoundsHolder

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

```
LayoutBoundsHolder()
```

## Public properties

### bounds

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

```
val bounds: RelativeLayoutBounds?
```

The bounds of the node this holder is referencing. This is backed by `https://developer.android.com/reference/kotlin/androidx/compose/runtime/MutableState` and might change frequently, so reading it during composition directly is discouraged.