Function freya::events::onpointerdown

source ·
pub fn onpointerdown<__Marker>(
    _f: impl SuperInto<Callback<Event<PointerData>>, __Marker>
) -> Attribute
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!")
        }
    )
}