Function freya::prelude::dioxus_elements::onpointerdown
pub fn onpointerdown<E, T>(
_f: impl FnMut(Event<PointerData>) -> E + 'static,
) -> Attributewhere
E: EventReturn<T>,
Expand description
The pointerdown
event fires when the user clicks/starts touching an element.
Event Data: PointerData
ยงExample
fn app() -> Element {
rsx!(
rect {
width: "100",
height: "100",
background: "red",
onpointerdown: |_| println!("Clicked/started pressing!")
}
)
}