RichTooltip

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

RichTooltip

Composable Component

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

Common
@Composable
@ExperimentalMaterial3Api
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,
)

Parameters

modifierthe Modifier to be applied to the tooltip.
titleAn optional title for the tooltip.
actionAn optional action for 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.
colorsRichTooltipColors that will be applied to the tooltip's container and content.
tonalElevationthe tonal elevation of the tooltip.
shadowElevationthe shadow elevation of the tooltip.
textthe composable that will be used to populate the rich tooltip's text.

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