use leptos::html::Div; use leptos::*; use leptos_use::docs::{demo_or_body, BooleanDisplay, Note}; use leptos_use::use_element_visibility; #[component] fn Demo(cx: Scope) -> impl IntoView { let el = create_node_ref::
(cx); let is_visible = use_element_visibility(cx, el); view! { cx,
"Info on the right bottom corner"
"Target Element (scroll down)"
"Element " " the viewport"
} } fn main() { _ = console_log::init_with_level(log::Level::Debug); console_error_panic_hook::set_once(); mount_to(demo_or_body(), |cx| { view! { cx, } }) }