use leptos::*; use leptos_use::docs::{demo_or_body, Note}; use leptos_use::{use_element_size, UseElementSizeReturn}; #[component] fn Demo(cx: Scope) -> impl IntoView { let el = create_node_ref(cx); let UseElementSizeReturn { width, height } = use_element_size(cx, el); let text = move || format!("width: {}\nheight: {}", width.get(), height.get()); view! { cx, "Resize the box to see changes"