State of Compose 2023 results are in! Click here to learn more

← Back to Material 3 Compose

PlainTooltip

Component
in
Material 3
. Since 1.2.0-alpha09

Overview

Code Examples

Plain tooltip that provides a descriptive message.

Usually used with TooltipBox.

@param modifier the Modifier to be applied to the tooltip. @param contentColor Color that will be applied to the tooltip's content. @param containerColor Color that will be applied to the tooltip's container. @param tonalElevation the tonal elevation of the tooltip. @param shadowElevation the shadow elevation of the tooltip. @param shape the Shape that should be applied to the tooltip container. @param content the composable that will be used to populate the tooltip's content.

Overloads

PlainTooltip

@Composable
@ExperimentalMaterial3Api
fun PlainTooltip(
    modifier: Modifier = Modifier,
    contentColor: Color = TooltipDefaults.plainTooltipContentColor,
    containerColor: Color = TooltipDefaults.plainTooltipContainerColor,
    tonalElevation: Dp = 0.dp,
    shadowElevation: Dp = 0.dp,
    shape: Shape = TooltipDefaults.plainTooltipContainerShape,
    content: @Composable () -> Unit
)

Parameters

NameDescription
modifierthe Modifier to be applied to the tooltip.
contentColorColor that will be applied to the tooltip's content.
containerColorColor that will be applied to the tooltip's container.
tonalElevationthe tonal elevation of the tooltip.
shadowElevationthe shadow elevation of the tooltip.
shapethe Shape that should be applied to the tooltip container.
contentthe composable that will be used to populate the tooltip's content