leptos_use_element_size/options.rs
1use crate::Size;
2use default_struct_builder::DefaultBuilder;
3
4#[derive(DefaultBuilder, Default)]
5/// Options for [`use_element_size_with_options`](crate::use_element_size_with_options).
6pub struct UseElementSizeOptions {
7 /// Initial size returned before any measurements on the `target` are done. Also the value reported
8 /// at first when the `target` is a signal and changes.
9 pub(crate) initial_size: Size,
10
11 /// The box that is used to determine the dimensions of the target. Defaults to `ContentBox`.
12 #[builder(into)]
13 pub box_: Option<web_sys::ResizeObserverBoxOptions>,
14}