leptos-use-element-size 0.20.1

Reactive size of an HTML element
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::Size;
use default_struct_builder::DefaultBuilder;

#[derive(DefaultBuilder, Default)]
/// Options for [`use_element_size_with_options`](crate::use_element_size_with_options).
pub struct UseElementSizeOptions {
    /// Initial size returned before any measurements on the `target` are done. Also the value reported
    /// at first when the `target` is a signal and changes.
    pub(crate) initial_size: Size,

    /// The box that is used to determine the dimensions of the target. Defaults to `ContentBox`.
    #[builder(into)]
    pub box_: Option<web_sys::ResizeObserverBoxOptions>,
}