{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

HoverInteractionKt

public final class HoverInteractionKt


Summary

Public methods

static final @NonNull State<@NonNull Boolean>

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

Public methods

collectIsHoveredAsState

@Composable
public static final @NonNull State<@NonNull BooleancollectIsHoveredAsState(@NonNull InteractionSource receiver)

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.

Returns
@NonNull State<@NonNull Boolean>

State representing whether this component is being hovered or not