pub struct BrowserFrameProps {Show 80 fields
pub children: Element,
pub url: String,
pub placeholder: &'static str,
pub on_url_change: Option<EventHandler<FormEvent>>,
pub on_close: EventHandler<()>,
pub on_minimize: EventHandler<()>,
pub on_maximize: EventHandler<()>,
pub show_controls: bool,
pub show_address_bar: bool,
pub read_only: bool,
pub size: Size,
pub variant: Variant,
pub custom_buttons: Vec<Element>,
pub class: &'static str,
pub frame_class: &'static str,
pub style: &'static str,
pub id: &'static str,
pub aria_label: &'static str,
pub aria_describedby: &'static str,
pub container_class: &'static str,
pub input_class: &'static str,
pub refresh_button_style: &'static str,
pub refresh_button_aria_label: &'static str,
pub icon_button_style: &'static str,
pub address_wrapper_base_style: &'static str,
pub header_base_style: &'static str,
pub on_close_mouse_over: EventHandler<()>,
pub on_close_mouse_out: EventHandler<()>,
pub on_close_focus: EventHandler<FocusEvent>,
pub on_close_blur: EventHandler<FocusEvent>,
pub close_class: &'static str,
pub close_svg_class: &'static str,
pub close_path_class: &'static str,
pub close_button_type: &'static str,
pub close_aria_label: &'static str,
pub close_title: &'static str,
pub close_tabindex: &'static str,
pub on_minimize_mouse_over: EventHandler<()>,
pub on_minimize_mouse_out: EventHandler<()>,
pub on_minimize_focus: EventHandler<FocusEvent>,
pub on_minimize_blur: EventHandler<FocusEvent>,
pub minimize_class: &'static str,
pub minimize_svg_class: &'static str,
pub minimize_path_class: &'static str,
pub minimize_button_type: &'static str,
pub minimize_aria_label: &'static str,
pub minimize_title: &'static str,
pub minimize_tabindex: &'static str,
pub on_maximize_mouse_over: EventHandler<()>,
pub on_maximize_mouse_out: EventHandler<()>,
pub on_maximize_focus: EventHandler<FocusEvent>,
pub on_maximize_blur: EventHandler<FocusEvent>,
pub maximize_class: &'static str,
pub maximize_svg_class: &'static str,
pub maximize_path_class: &'static str,
pub maximize_button_type: &'static str,
pub maximize_aria_label: &'static str,
pub maximize_title: &'static str,
pub maximize_tabindex: &'static str,
pub share_button_style: &'static str,
pub share_onclick: EventHandler<()>,
pub share_onmouseover: EventHandler<()>,
pub share_onmouseout: EventHandler<()>,
pub share_onfocus: EventHandler<FocusEvent>,
pub share_onblur: EventHandler<FocusEvent>,
pub share_tabindex: &'static str,
pub tabs_button_style: &'static str,
pub tabs_onclick: EventHandler<()>,
pub tabs_onmouseover: EventHandler<()>,
pub tabs_onmouseout: EventHandler<()>,
pub tabs_onfocus: EventHandler<FocusEvent>,
pub tabs_onblur: EventHandler<FocusEvent>,
pub tabs_tabindex: &'static str,
pub more_button_style: &'static str,
pub more_onclick: EventHandler<()>,
pub more_onmouseover: EventHandler<()>,
pub more_onmouseout: EventHandler<()>,
pub more_onfocus: EventHandler<FocusEvent>,
pub more_onblur: EventHandler<FocusEvent>,
pub more_tabindex: &'static str,
}
dio
only.Expand description
Properties for the BrowserFrame
component.
This component simulates a web browser window with controls like close, minimize, maximize, and supports rich customization via props.
Fieldsยง
ยงchildren: Element
Child elements rendered inside the browser frame body.
url: String
The URL displayed in the address bar and used in the iframe.
placeholder: &'static str
Placeholder text shown in the address input field.
on_url_change: Option<EventHandler<FormEvent>>
Event handler for when the address bar URL changes.
on_close: EventHandler<()>
Event handler triggered when the close button is clicked.
on_minimize: EventHandler<()>
Event handler triggered when the minimize button is clicked.
on_maximize: EventHandler<()>
Event handler triggered when the maximize button is clicked.
show_controls: bool
Whether to show the top-right control buttons (close, minimize, maximize).
Defaults to true
.
show_address_bar: bool
Whether to show the address bar.
Defaults to true
.
read_only: bool
Whether the address bar is read-only.
Defaults to false
.
size: Size
Size of the browser frame container.
variant: Variant
Display variant for the frame (e.g., Tabs, Plain, etc.).
Optional list of custom buttons displayed in the top bar.
class: &'static str
CSS class applied to the outermost container.
Defaults to:
"rounded-lg border shadow-lg overflow-hidden bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700"
frame_class: &'static str
CSS class applied to the browser frame.
style: &'static str
Inline style string applied to the outermost container.
id: &'static str
HTML id attribute for the browser container.
aria_label: &'static str
ARIA label for accessibility.
Defaults to "Browser window"
.
aria_describedby: &'static str
ARIA description for additional accessibility context.
container_class: &'static str
Additional CSS class for the address bar container.
input_class: &'static str
Additional CSS class for the input element in the address bar.
Defaults to "text-black dark:text-white"
.
Inline style for the refresh button inside the address bar.
ARIA label for the refresh button.
Defaults to "Refresh"
.
Shared inline style for all icon buttons (close, minimize, maximize).
address_wrapper_base_style: &'static str
Inline style for the wrapper around the address bar.
header_base_style: &'static str
Inline style for the header container (holds address bar and controls).
on_close_mouse_over: EventHandler<()>
ยงon_close_mouse_out: EventHandler<()>
ยงon_close_focus: EventHandler<FocusEvent>
ยงon_close_blur: EventHandler<FocusEvent>
ยงclose_class: &'static str
ยงclose_svg_class: &'static str
ยงclose_path_class: &'static str
ยงclose_aria_label: &'static str
ยงclose_title: &'static str
ยงclose_tabindex: &'static str
ยงon_minimize_mouse_over: EventHandler<()>
ยงon_minimize_mouse_out: EventHandler<()>
ยงon_minimize_focus: EventHandler<FocusEvent>
ยงon_minimize_blur: EventHandler<FocusEvent>
ยงminimize_class: &'static str
ยงminimize_svg_class: &'static str
ยงminimize_path_class: &'static str
ยงminimize_aria_label: &'static str
ยงminimize_title: &'static str
ยงminimize_tabindex: &'static str
ยงon_maximize_mouse_over: EventHandler<()>
ยงon_maximize_mouse_out: EventHandler<()>
ยงon_maximize_focus: EventHandler<FocusEvent>
ยงon_maximize_blur: EventHandler<FocusEvent>
ยงmaximize_class: &'static str
ยงmaximize_svg_class: &'static str
ยงmaximize_path_class: &'static str
ยงmaximize_aria_label: &'static str
ยงmaximize_title: &'static str
ยงmaximize_tabindex: &'static str
ยงtabs_onclick: EventHandler<()>
ยงtabs_onmouseover: EventHandler<()>
ยงtabs_onmouseout: EventHandler<()>
ยงtabs_onfocus: EventHandler<FocusEvent>
ยงtabs_onblur: EventHandler<FocusEvent>
ยงtabs_tabindex: &'static str
ยงmore_onclick: EventHandler<()>
ยงmore_onmouseover: EventHandler<()>
ยงmore_onmouseout: EventHandler<()>
ยงmore_onfocus: EventHandler<FocusEvent>
ยงmore_onblur: EventHandler<FocusEvent>
ยงmore_tabindex: &'static str
Implementationsยง
Sourceยงimpl BrowserFrameProps
impl BrowserFrameProps
Sourcepub fn builder() -> BrowserFramePropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> BrowserFramePropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building BrowserFrameProps
.
On the builder, call .children(...)
(optional), .url(...)
(optional), .placeholder(...)
(optional), .on_url_change(...)
(optional), .on_close(...)
(optional), .on_minimize(...)
(optional), .on_maximize(...)
(optional), .show_controls(...)
(optional), .show_address_bar(...)
(optional), .read_only(...)
(optional), .size(...)
(optional), .variant(...)
(optional), .custom_buttons(...)
(optional), .class(...)
(optional), .frame_class(...)
(optional), .style(...)
(optional), .id(...)
(optional), .aria_label(...)
(optional), .aria_describedby(...)
(optional), .container_class(...)
(optional), .input_class(...)
(optional), .refresh_button_style(...)
(optional), .refresh_button_aria_label(...)
(optional), .icon_button_style(...)
(optional), .address_wrapper_base_style(...)
(optional), .header_base_style(...)
(optional), .on_close_mouse_over(...)
(optional), .on_close_mouse_out(...)
(optional), .on_close_focus(...)
(optional), .on_close_blur(...)
(optional), .close_class(...)
(optional), .close_svg_class(...)
(optional), .close_path_class(...)
(optional), .close_button_type(...)
(optional), .close_aria_label(...)
(optional), .close_title(...)
(optional), .close_tabindex(...)
(optional), .on_minimize_mouse_over(...)
(optional), .on_minimize_mouse_out(...)
(optional), .on_minimize_focus(...)
(optional), .on_minimize_blur(...)
(optional), .minimize_class(...)
(optional), .minimize_svg_class(...)
(optional), .minimize_path_class(...)
(optional), .minimize_button_type(...)
(optional), .minimize_aria_label(...)
(optional), .minimize_title(...)
(optional), .minimize_tabindex(...)
(optional), .on_maximize_mouse_over(...)
(optional), .on_maximize_mouse_out(...)
(optional), .on_maximize_focus(...)
(optional), .on_maximize_blur(...)
(optional), .maximize_class(...)
(optional), .maximize_svg_class(...)
(optional), .maximize_path_class(...)
(optional), .maximize_button_type(...)
(optional), .maximize_aria_label(...)
(optional), .maximize_title(...)
(optional), .maximize_tabindex(...)
(optional), .share_button_style(...)
(optional), .share_onclick(...)
(optional), .share_onmouseover(...)
(optional), .share_onmouseout(...)
(optional), .share_onfocus(...)
(optional), .share_onblur(...)
(optional), .share_tabindex(...)
(optional), .tabs_button_style(...)
(optional), .tabs_onclick(...)
(optional), .tabs_onmouseover(...)
(optional), .tabs_onmouseout(...)
(optional), .tabs_onfocus(...)
(optional), .tabs_onblur(...)
(optional), .tabs_tabindex(...)
(optional), .more_button_style(...)
(optional), .more_onclick(...)
(optional), .more_onmouseover(...)
(optional), .more_onmouseout(...)
(optional), .more_onfocus(...)
(optional), .more_onblur(...)
(optional), .more_tabindex(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of BrowserFrameProps
.
Trait Implementationsยง
Sourceยงimpl Clone for BrowserFrameProps
impl Clone for BrowserFrameProps
Sourceยงfn clone(&self) -> BrowserFrameProps
fn clone(&self) -> BrowserFrameProps
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSourceยงimpl PartialEq for BrowserFrameProps
impl PartialEq for BrowserFrameProps
Sourceยงimpl Properties for BrowserFramePropswhere
Self: Clone,
impl Properties for BrowserFramePropswhere
Self: Clone,
Sourceยงtype Builder = BrowserFramePropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
type Builder = BrowserFramePropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Sourceยงfn memoize(&mut self, new: &Self) -> bool
fn memoize(&mut self, new: &Self) -> bool
Sourceยงfn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
impl StructuralPartialEq for BrowserFrameProps
Auto Trait Implementationsยง
impl !Freeze for BrowserFrameProps
impl !RefUnwindSafe for BrowserFrameProps
impl !Send for BrowserFrameProps
impl !Sync for BrowserFrameProps
impl Unpin for BrowserFrameProps
impl !UnwindSafe for BrowserFrameProps
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Sourceยงfn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Sourceยงimpl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Sourceยงfn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
self
to a value of a Properties
struct.Sourceยงimpl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Sourceยงfn into_prop_value(self) -> T
fn into_prop_value(self) -> T
self
to a value of a Properties
struct.