---
title: "getFocusedRect"
description: "Calculates the rectangular area in this node's coordinates that corresponds to the focus area of
the focused node under this [FocusTargetModifierNode], including itself.

This function returns `null` when;
- This node is not focused and there is no focused descendant.
- This node is detached from the composition hierarchy."
type: "function"
---

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


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


```kotlin
fun FocusTargetModifierNode.getFocusedRect(): Rect?
```


Calculates the rectangular area in this node's coordinates that corresponds to the focus area of
the focused node under this `FocusTargetModifierNode`, including itself.

This function returns `null` when;
- This node is not focused and there is no focused descendant.
- This node is detached from the composition hierarchy.



