androidx.compose.ui.input.pointer

stylusHoverIconSince 1.8

Function · from org.jetbrains.compose.ui:ui:1.12.2

No hand-written docs yet.

Modifier that lets a developer define a pointer icon to display when a stylus is hovered over the element. When overrideDescendants is set to true, descendants cannot override the pointer icon using this modifier.

Parameters

fun Modifier.stylusHoverIcon(
    icon: PointerIcon,
    overrideDescendants: Boolean = false,
    touchBoundsExpansion: DpTouchBoundsExpansion? = null,
)

icon: PointerIconRequired

the icon to set

overrideDescendants: BooleanOptional

Default: false

when false (by default), descendants are able to set their own pointer icon. If true, no descendants under this parent are eligible to change the icon (it will be set to the this (the parent's) icon).

touchBoundsExpansion: DpTouchBoundsExpansion?Optional

Default: null

amount by which the element's bounds is expanded

Library docs

Modifier that lets a developer define a pointer icon to display when a stylus is hovered over the element. When overrideDescendants is set to true, descendants cannot override the pointer icon using this modifier.