Function freya_elements::elements::onpointerover

source ·
pub fn onpointerover<E: EventReturn<T>, T>(
    _f: impl FnMut(Event<PointerData>) -> E + 'static
) -> Attribute
Expand description

The pointerover event fires when the user hovers/touches over an element. Unlike onpointerenter, this fires even if the user was already hovering over the element. For that reason, it’s less efficient.

Event Data: PointerData

§Example

fn app() -> Element {
    rsx!(
        rect {
            width: "100",
            height: "100",
            background: "red",
            onpointerover: |_| println!("Hovering or touching!")
        }
    )
}