Skip to main content

TooltipBox

Function TooltipBox 

Source
pub fn TooltipBox(
    text: impl Into<String>,
    state: Rc<TooltipState>,
    content: View,
    config: TooltipConfig,
) -> View
Expand description

Wraps content with a tooltip label shown above it when state is visible.

Usage:

let tip = TooltipState::new();
TooltipBox("I'm a tooltip", tip.clone(), Modifier::new(), Button("Hover me", {
    let tip = tip.clone();
    move || tip.show()
}));