PlainTooltip

Composable Component

Common

Deprecated Maintained for binary compatibility

@Composable
@ExperimentalMaterial3Api
fun TooltipScope.PlainTooltip(
    modifier: Modifier = Modifier,
    caretSize: DpSize = DpSize.Unspecified,
    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,
) =
    PlainTooltip(
        modifier,
        TooltipDefaults.caretShape(caretSize),
        maxWidth,
        shape,
        contentColor,
        containerColor,
        tonalElevation,
        shadowElevation,
        content,
    )
Common
@Composable
@ExperimentalMaterial3Api
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,
)

Parameters

modifierthe Modifier to be applied to the tooltip.
caretShapeshape for the caret of the tooltip. If a default caret is desired with a specific dimension please use TooltipDefaults.caretShape. To see the default dimensions please see TooltipDefaults.caretSize. If no caret is desired, please pass in null.
maxWidththe maximum width for the plain tooltip
shapethe Shape that should be applied to the tooltip container.
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.
contentthe composable that will be used to populate the tooltip's content.

Create your own Component Library

Material Components are meant to be used as is and they do not allow customizations. To build your own Jetpack Compose component library use Compose Unstyled