androidx.compose.material3
RichTooltip
Composable function
A part of TooltipBox. See that page for an overview and examples.
Parameters
@Composable
fun TooltipScope.RichTooltip(
modifier: Modifier = Modifier,
title: (@Composable () -> Unit)? = null,
action: (@Composable () -> Unit)? = null,
caretShape: (Shape)? = null,
maxWidth: Dp = TooltipDefaults.richTooltipMaxWidth,
shape: Shape = TooltipDefaults.richTooltipContainerShape,
colors: RichTooltipColors = TooltipDefaults.richTooltipColors(),
tonalElevation: Dp = ElevationTokens.Level0,
shadowElevation: Dp = RichTooltipTokens.ContainerElevation,
text: @Composable () -> Unit,
)
title: (@Composable () -> Unit)?Optional
title: (@Composable () -> Unit)?OptionalDefault: null
A short title above the text of a rich tooltip.
action: (@Composable () -> Unit)?Optional
action: (@Composable () -> Unit)?OptionalDefault: null
A button in a rich tooltip, like "Learn more".
caretShape: (Shape)?OptionalSince 1.9
caretShape: (Shape)?OptionalSince 1.9Default: null
A small arrow pointing at the element. null means no arrow.
maxWidth: DpOptionalSince 1.9
maxWidth: DpOptionalSince 1.9Default: TooltipDefaults.richTooltipMaxWidth
The widest the tooltip can be. Longer text wraps.
shape: ShapeOptional
shape: ShapeOptionalDefault: TooltipDefaults.richTooltipContainerShape
Sets the outline. See the Shapes guide.
colors: RichTooltipColorsOptional
colors: RichTooltipColorsOptionalDefault: TooltipDefaults.richTooltipColors()
Sets the colors of a rich tooltip. Make one with TooltipDefaults.richTooltipColors.
tonalElevation: DpOptional
tonalElevation: DpOptionalDefault: ElevationTokens.Level0
Tints the background a little toward the primary color.
shadowElevation: DpOptional
shadowElevation: DpOptionalDefault: RichTooltipTokens.ContainerElevation
The size of the shadow under the tooltip.
text: @Composable () -> UnitRequired
text: @Composable () -> UnitRequiredThe main text of a rich tooltip.
Same as in TooltipBox: modifier.
Parts
TooltipBoxPlainTooltipRichTooltip