Popover

@Composable
fun Popover(target: ElementTarget, modifier: Modifier = Modifier, variant: CssStyleVariant<PopupKind>? = null, placement: PopupPlacement = PopupPlacement.Bottom, 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)

Render a general, undecorated composable in a location above and outside some target element.

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

See also: Tooltip, which wraps your composable in a sort of chat bubble, making it particularly well-suited for text tooltips.

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

target

Indicates which element should listen for mouse enter and leave events in order to cause this popup to show up and hide.

offsetPixels

How many pixels the popup should be offset from the target element.

placementTarget

If set, indicates which element the popup should be shown relative to. If not set, the original target will be used.

showDelayMs

If set, there will be a delay before the popup is shown after the mouse enters the target.

hideDelayMs

If set, there will be a delay before the popup is hidden after the mouse leaves the target.

keepOpenStrategy

Once a popup is open, this strategy controls how it should decide to stay open. If no strategy is passed in, the popup will stay open as long as the mouse is over it or if any child inside of it has focus. See also: KeepPopupOpenStrategy.