# collectIsHoveredAsState

Common/All

## Functions summary

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html>` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/InteractionSource.https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/collectIsHoveredAsState.composable#(androidx.compose.foundation.interaction.InteractionSource).collectIsHoveredAsState()()` Subscribes to this `https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/MutableInteractionSource` and returns a `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State` representing whether this component is hovered or not. | Cmn |

## Functions

### InteractionSource.collectIsHoveredAsState

Cmn Artifact: [androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/interaction/HoverInteraction.kt+function:collectIsHoveredAsState) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.1.0)

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

Subscribes to this `https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/MutableInteractionSource` and returns a `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State` representing whether this component is hovered or not.

`https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/HoverInteraction` is typically set by `https://developer.android.com/reference/kotlin/androidx/compose/foundation/hoverable.modifier#(androidx.compose.ui.Modifier).hoverable(androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Boolean)` and hoverable components.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html>` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State` representing whether this component is being hovered or not |