Composable Function

collectIsHoveredAsState

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

collectIsHoveredAsState

Source set: Common
@Composable
public fun InteractionSource.collectIsHoveredAsState(): State<Boolean>

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

HoverInteraction is typically set by androidx.compose.foundation.hoverable and hoverable components.

Return

State representing whether this component is being hovered or not

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: