Compose Modifier

pointerHoverIcon

Modifier that lets a developer define a pointer icon to display when the cursor is hovered over the element.

PointerIconSample

@Composable
fun PointerIconSample() {
    Column(Modifier.pointerHoverIcon(PointerIcon.Crosshair)) {
        SelectionContainer {
            Column {
                Text("Selectable text")
                Text(
                    modifier = Modifier.pointerHoverIcon(PointerIcon.Hand, true),
                    text = "Selectable text with hand",
                )
            }
        }
        Text("Just text with global pointerIcon")
    }
}