use_window_scroll
Reactive window scroll.
Demo
Usage
use leptos::*;
use leptos_use::use_window_scroll;
#[component]
fn Demo() -> impl IntoView {
let (x, y) = use_window_scroll();
view! { }
}
Server-Side Rendering
On the server this returns Signal
s that are always 0.0
.
Feature
This function is only available if the crate feature
use_window_scroll
is enabled