androidx.compose.material3

PlainTooltip

Composable function

A part of TooltipBox. See that page for an overview and examples.

Parameters

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

caretShape: (Shape)?OptionalSince 1.9

Default: null

A small arrow pointing at the element. null means no arrow.

maxWidth: DpOptionalSince 1.9

Default: TooltipDefaults.plainTooltipMaxWidth

The widest the tooltip can be. Longer text wraps.

shape: ShapeOptional

Default: TooltipDefaults.plainTooltipContainerShape

Sets the outline. See the Shapes guide.

contentColor: ColorOptional

Default: TooltipDefaults.plainTooltipContentColor

The text color of a plain tooltip.

containerColor: ColorOptional

Default: TooltipDefaults.plainTooltipContainerColor

The background color of a plain tooltip.

tonalElevation: DpOptional

Default: 0.dp

Tints the background a little toward the primary color.

shadowElevation: DpOptional

Default: 0.dp

The size of the shadow under the tooltip.

Same as in TooltipBox: modifier, content.

Parts