← Compose Multiplatform Component in Compose Foundation
BoxWithTooltip
Desktop
Sets the tooltip for an element.
Last updated:
Installation
dependencies {
implementation("androidx.compose.foundation:foundation:1.7.0-beta04")
}
Overloads
@Suppress("UNUSED_PARAMETER"
@Deprecated(
"Use TooltipArea",
replaceWith = ReplaceWith(
"TooltipArea(tooltip, modifier, delay, tooltipPlacement, content)"
)
@Composable
@OptIn(ExperimentalFoundationApi::class
fun BoxWithTooltip(
tooltip: @Composable () -> Unit,
modifier: Modifier = Modifier,
contentAlignment: Alignment = Alignment.TopStart,
propagateMinConstraints: Boolean = false,
delay: Int = 500,
tooltipPlacement: TooltipPlacement = TooltipPlacement.CursorPoint(
offset = DpOffset(0.dp, 16.dp)
),
content: @Composable () -> Unit
)
Parameters
name | description |
---|---|
tooltip | Composable content of the tooltip. |
modifier | The modifier to be applied to the layout. |
contentAlignment | The default alignment inside the Box. |
propagateMinConstraints | Whether the incoming min constraints should be passed to content. |
delay | Delay in milliseconds. |
tooltipPlacement | Defines position of the tooltip. |
content | Composable content that the current tooltip is set to. |