---
title: "onFocusedBoundsChanged"
description: "Calls [onPositioned] whenever the bounds of the currently-focused area changes. If a child of
this node has focus, [onPositioned] will be called immediately with a non-null
[LayoutCoordinates] that can be queried for the focused bounds, and again every time the focused
child changes or is repositioned. When a child loses focus, [onPositioned] will be passed `null`.

When an event occurs, it is bubbled up from the focusable node, so the nearest parent gets the
event first, and then its parent, etc.

Note that there may be some cases where the focused bounds change but the callback is _not_
invoked, but the last [LayoutCoordinates] will always return the most up-to-date bounds."
type: "modifier"
---

<div class='type'>Compose Modifier</div>

<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun Modifier.onFocusedBoundsChanged(onPositioned: (LayoutCoordinates?) -> Unit): Modifier
```


Calls `onPositioned` whenever the bounds of the currently-focused area changes. If a child of
this node has focus, `onPositioned` will be called immediately with a non-null
`LayoutCoordinates` that can be queried for the focused bounds, and again every time the focused
child changes or is repositioned. When a child loses focus, `onPositioned` will be passed `null`.

When an event occurs, it is bubbled up from the focusable node, so the nearest parent gets the
event first, and then its parent, etc.

Note that there may be some cases where the focused bounds change but the callback is _not_
invoked, but the last `LayoutCoordinates` will always return the most up-to-date bounds.



