Function leptos_use::use_element_hover
source · pub fn use_element_hover<El, T>(el: El) -> Signal<bool>
Expand description
Reactive element’s hover state.
§Demo
§Usage
let el = create_node_ref::<Button>();
let is_hovered = use_element_hover(el);
view! {
<button node_ref=el>{ move || format!("{:?}", is_hovered.get()) }</button>
}
§Server-Side Rendering
On the server this returns a Signal
that always contains the value false
.