← Back to Material 3 Compose
RichTooltip
Component
in
Material 3
. Since 1.2.0-alpha09Overview
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
Name | Description |
---|---|
modifier | the Modifier to be applied to the tooltip. |
title | An optional title for the tooltip. |
action | An optional action for the tooltip. |
colors | RichTooltipColors that will be applied to the tooltip's container and content. |
tonalElevation | the tonal elevation of the tooltip. |
shadowElevation | the shadow elevation of the tooltip. |
shape | the Shape that should be applied to the tooltip container. |
text | the composable that will be used to populate the rich tooltip's text |