Function freya::components::GestureArea

source ·
pub fn GestureArea(props: GestureAreaProps) -> Result<VNode, RenderError>
Expand description

Detect complex touch gestures such as Gesture::DoubleTap.

§Example

fn app() -> Element {
   let mut gesture = use_signal(|| "Tap here".to_string());
   rsx!(
       GestureArea {
           ongesture: move |g| gesture.set(format!("{g:?}")),
           label {
               "{gesture}"
           }
       }
   )
}