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

← Back to Material 3 Compose

RichTooltip

Component
in
Material 3
. Since 1.2.0-alpha09

Overview

Code Examples

Rich text tooltip that allows the user to pass in a title, text, and action. Tooltips are used to provide a descriptive message.

Usually used with TooltipBox

@param modifier the Modifier to be applied to the tooltip. @param title An optional title for the tooltip. @param action An optional action for the tooltip. @param colors RichTooltipColors that will be applied to the tooltip's container and content. @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 text the composable that will be used to populate the rich tooltip's text.

Overloads

RichTooltip

@Composable
@ExperimentalMaterial3Api
fun RichTooltip(
    modifier: Modifier = Modifier,
    title: (@Composable () -> Unit)? = null,
    action: (@Composable () -> Unit)? = null,
    colors: RichTooltipColors = TooltipDefaults.richTooltipColors(),
    tonalElevation: Dp = RichTooltipTokens.ContainerElevation,
    shadowElevation: Dp = RichTooltipTokens.ContainerElevation,
    shape: Shape = TooltipDefaults.richTooltipContainerShape,
    text: @Composable () -> Unit
)

Parameters

NameDescription
modifierthe Modifier to be applied to the tooltip.
titleAn optional title for the tooltip.
actionAn optional action for the tooltip.
colorsRichTooltipColors that will be applied to the tooltip's container and content.
tonalElevationthe tonal elevation of the tooltip.
shadowElevationthe shadow elevation of the tooltip.
shapethe Shape that should be applied to the tooltip container.
textthe composable that will be used to populate the rich tooltip's text