pub struct TooltipProps {
pub title: Option<String>,
pub content: Option<Element>,
pub placement: Option<TooltipPlacement>,
pub trigger: TooltipTrigger,
pub open: Option<bool>,
pub default_open: Option<bool>,
pub on_open_change: Option<EventHandler<bool>>,
pub disabled: bool,
pub class: Option<String>,
pub overlay_class: Option<String>,
pub overlay_style: Option<String>,
pub children: Element,
}Expand description
Props for the Tooltip component (MVP subset).
Fields§
§title: Option<String>Simple text title shown inside the tooltip when content is not set.
content: Option<Element>Custom tooltip content node.
placement: Option<TooltipPlacement>Placement of the tooltip relative to the trigger. Defaults to Top.
trigger: TooltipTriggerHow the tooltip is triggered. Defaults to hover.
open: Option<bool>Controlled open state. When set, the component becomes controlled and does not manage its own visibility.
default_open: Option<bool>Initial open state when used in uncontrolled mode.
on_open_change: Option<EventHandler<bool>>Called when the open state changes due to user interaction.
disabled: boolDisable user interaction.
class: Option<String>Extra class for the trigger wrapper.
overlay_class: Option<String>Extra class for the tooltip bubble.
overlay_style: Option<String>Inline styles applied to the tooltip bubble.
children: ElementTrigger element.
Implementations§
Source§impl TooltipProps
impl TooltipProps
Sourcepub fn builder() -> TooltipPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> TooltipPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building TooltipProps.
On the builder, call .title(...)(optional), .content(...)(optional), .placement(...)(optional), .trigger(...)(optional), .open(...)(optional), .default_open(...)(optional), .on_open_change(...)(optional), .disabled(...)(optional), .class(...)(optional), .overlay_class(...)(optional), .overlay_style(...)(optional), .children(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of TooltipProps.
Trait Implementations§
Source§impl Clone for TooltipProps
impl Clone for TooltipProps
Source§fn clone(&self) -> TooltipProps
fn clone(&self) -> TooltipProps
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more