TooltipScope

sealed interface TooltipScope

Receiver scope for the TooltipBox tooltip content (PlainTooltip / RichTooltip). It exposes the resolved anchor position and the anchor bounds so a caret can be drawn pointing at the anchor.

Properties

Link copied to clipboard

The preferred TooltipAnchorPosition of the tooltip relative to its anchor.

Functions

Link copied to clipboard

The anchor bounds in window coordinates, or null before the anchor is placed.

Link copied to clipboard
fun TooltipScope.PlainTooltip(modifier: Modifier = Modifier, caretShape: Shape? = null, maxWidth: Dp = TooltipDefaults.PlainTooltipMaxWidth, cornerRadius: Dp = TooltipDefaults.PlainTooltipCornerRadius, containerColor: Color = TooltipDefaults.plainTooltipContainerColor, contentColor: Color = TooltipDefaults.plainTooltipContentColor, insideMargin: PaddingValues = TooltipDefaults.PlainTooltipInsideMargin, content: @Composable () -> Unit)

A plain tooltip that briefly describes an anchor with a short text label, using the Miuix inverse surface style.

Link copied to clipboard
fun TooltipScope.RichTooltip(modifier: Modifier = Modifier, title: @Composable () -> Unit? = null, action: @Composable () -> Unit? = null, caretShape: Shape? = null, maxWidth: Dp = TooltipDefaults.RichTooltipMaxWidth, cornerRadius: Dp = TooltipDefaults.RichTooltipCornerRadius, colors: RichTooltipColors = TooltipDefaults.richTooltipColors(), insideMargin: PaddingValues = TooltipDefaults.RichTooltipInsideMargin, text: @Composable () -> Unit)

A rich tooltip that explains an anchor with an optional title, body text, and an optional action, using the Miuix surface-container card style.