---
title: "collectIsFocusedAsState"
description: "Subscribes to this [MutableInteractionSource] and returns a [State] representing whether this
component is focused or not.

[FocusInteraction] is typically set by [androidx.compose.foundation.focusable] and focusable
components, such as [androidx.compose.foundation.text.BasicTextField]."
type: "composable"
---

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


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

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


```kotlin
@Composable
fun InteractionSource.collectIsFocusedAsState(): State<Boolean>
```


Subscribes to this `MutableInteractionSource` and returns a `State` representing whether this
component is focused or not.

`FocusInteraction` is typically set by `androidx.compose.foundation.focusable` and focusable
components, such as `androidx.compose.foundation.text.BasicTextField`.

#### Returns

| | |
| --- | --- |
|  | `State` representing whether this component is being focused or not |





