experimentalInteractionStyle

fun Modifier.experimentalInteractionStyle(interactionSource: InteractionSource?, enabled: Boolean = true, selected: Boolean = false, style: Style): Modifier


fun Modifier.experimentalInteractionStyle(interactionSource: InteractionSource?, enabled: Boolean = true, selected: Boolean = false, block: StyleScope.() -> Unit): Modifier

Sets a Style on the element that reacts to interactions from the provided interactionSource.

Since

0.4.0

Parameters

interactionSource

The InteractionSource used to listen to user interactions such as pressed and focus.

enabled

Whether the element is currently enabled.

selected

Whether the element is currently selected.

block

Lambda to apply style properties. The block provides access to the elements current InteractionState (focused, pressed, selected, etc) through StyleScope.