tooltip

fun Modifier.tooltip(text: UiText, delayMillis: Long = 500): Modifier(source)

Shows a profile-backed root tooltip while the modified element remains hovered.

The tooltip is painted after the complete screen, escapes ancestor child clips, and is clamped to the root viewport.

Receiver

immutable modifier chain built during an active screen evaluation.

Return

a new chain containing one retained tooltip behavior.

Parameters

text

unresolved single-line tooltip text.

delayMillis

non-negative hover delay.


fun Modifier.tooltip(text: String, delayMillis: Long = 500): Modifier(source)

Literal-text overload of tooltip.


fun Modifier.tooltip(text: UiText, decorated: Boolean, delayMillis: Long = 500): Modifier(source)

Shows text with optional standard tooltip decoration and content inset. Disabling decorated displays only the text, without the background, frame, or inset. See tooltip for hover timing and root placement.


fun Modifier.tooltip(text: String, decorated: Boolean, delayMillis: Long = 500): Modifier(source)

Literal-text overload with optional standard tooltip decoration.


fun Modifier.tooltip(delayMillis: Long = 500, decorated: Boolean = true, content: UiScope.() -> Unit): Modifier(source)

Shows one display-only component root after the hover delay. Content is evaluated immediately and must emit exactly one root; use a layout to group multiple components. The root escapes ancestor clips, is constrained to the viewport, and does not receive input or focus. Decoration adds the runtime's standard background, frame, and three-pixel inset. Disabling decorated displays only the content; the four-pixel anchor gap remains. Components remain subject to the active runtime's supported capabilities.

Parameters

delayMillis

non-negative hover delay, defaulting to 500 milliseconds.

decorated

whether to apply the standard tooltip surface and content inset, defaulting to true.

content

synchronous callback producing the tooltip root.