Function freya::prelude::dioxus_elements::events::onpointerenter

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

The pointerenter event fires when the user starts hovering/touching an element.

Event Data: PointerData

§Example

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