New Compose Multiplatform components arrived on Composables UICheck it out →

Component in Compose Foundation

TooltipArea

Desktop

Sets the tooltip for an element.

Last updated:

Installation

dependencies {
   implementation("androidx.compose.foundation:foundation:1.7.0-beta04")
}

Overloads

@Composable
@OptIn(ExperimentalFoundationApi::class
fun TooltipArea(
    tooltip: @Composable () -> Unit,
    modifier: Modifier = Modifier,
    delayMillis: Int = 500,
    tooltipPlacement: TooltipPlacement = TooltipPlacement.CursorPoint(
        offset = DpOffset(0.dp, 16.dp)
    ),
    content: @Composable () -> Unit
)

Parameters

namedescription
tooltipComposable content of the tooltip.
modifierThe modifier to be applied to the layout.
delayMillisDelay in milliseconds.
tooltipPlacementDefines position of the tooltip.
contentComposable content that the current tooltip is set to.