Compose Modifier

stylusHoverIcon

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

stylusHoverIcon

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

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

icon the icon to set
overrideDescendants 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 amount by which the element's bounds is expanded