Tooltip

@Composable
fun Tooltip(target: ElementTarget, modifier: Modifier = Modifier, variant: CssStyleVariant<TooltipKind>? = null, placement: PopupPlacement = PopupPlacement.Bottom, hasArrow: Boolean = true, offsetPixels: Number = DEFAULT_POPUP_OFFSET_PX, placementTarget: ElementTarget? = null, showDelayMs: Int = 0, hideDelayMs: Int = 0, keepOpenStrategy: KeepPopupOpenStrategy? = null, ref: ElementRefScope<HTMLElement>? = null, content: @Composable PopupScope.() -> Unit)(source)

A widget for displaying information inside a sort of chat bubble with an (optional) arrow on it.

This method should be configurable enough for a majority of cases, but AdvancedTooltip is also provided for people who need even more control.

See also: Popover, which shows information without any outer decoration.

k * Note: For users who are only using silk widgets and not kobweb, then you must call DeferringHost yourself first, as a parent method that this lives under. See the method for more details.

Parameters

keepOpenStrategy

The strategy for how to keep the tooltip open. If nothing is specified, then the tooltip will close whenever the user moves the mouse away from the target element.


@Composable
fun Tooltip(target: ElementTarget, text: String, modifier: Modifier = Modifier, variant: CssStyleVariant<TooltipKind>? = null, placement: PopupPlacement = PopupPlacement.Bottom, hasArrow: Boolean = true, offsetPixels: Number = DEFAULT_POPUP_OFFSET_PX, placementTarget: ElementTarget? = null, showDelayMs: Int = 0, hideDelayMs: Int = 0, keepOpenStrategy: KeepPopupOpenStrategy? = null, ref: ElementRefScope<HTMLElement>? = null)(source)

A convenience Tooltip making it trivial to display some text message.

You can use newlines in your text to split it across multiple lines.

This method should be configurable enough for a majority of cases, but AdvancedTooltip is also provided for people who need even more control.