New Compose Multiplatform components arrived on Composables UICheck it out →

Modifier in Compose Ui

pointerMoveFilter

Desktop

Last updated:

Installation

dependencies {
   implementation("androidx.compose.ui:ui:1.7.0-beta04")
}

Overloads

@ExperimentalComposeUiApi
fun Modifier.pointerMoveFilter(
    onMove: (position: Offset) -> Boolean = { false },
    onExit: () -> Boolean = { false },
    onEnter: () -> Boolean = { false },
)

Parameters

namedescription
onMoveThe callback invoked when pointer is moved inside a component, relative position inside a component is passed
onEnterThe callback invoked when pointer enters the component
onExitThe callback invoked when pointer leaves the component