RichTooltipBox

fun RichTooltipBox(text: String, modifier: Modifier = Modifier, state: TooltipState = rememberTooltipState(isPersistent = true), title: String? = null, actionText: String? = null, onActionClick: () -> Unit? = null, enabled: Boolean = true, positioning: TooltipAnchorPosition = TooltipAnchorPosition.Below, colors: RichTooltipColors = TooltipDefaults.richTooltipColors(), content: @Composable () -> Unit)

A rich tooltip convenience that wraps TooltipBox + RichTooltip with an optional title and a single text action. The action invokes onActionClick then dismisses the tooltip.

The tooltip is persistent: trigger it via long press / hover, or hoist state and call TooltipState.show from the anchor's own click. It is dismissed by an outside tap, a back press, or the action.

Parameters

text

the body text of the tooltip.

modifier

the modifier applied to the anchor wrapper.

state

the TooltipState controlling visibility.

title

the optional title shown above the body.

actionText

the optional action label.

onActionClick

called when the action is clicked, before the tooltip is dismissed.

enabled

whether hover / long press on the anchor shows the tooltip.

positioning

the preferred TooltipAnchorPosition of the tooltip.

colors

the RichTooltipColors of the tooltip.

content

the anchor content.