RichTooltipAndroid
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.
Android
Deprecated Maintained for binary compatibility. Use overload with maxWidth parameter.
@Composable
@ExperimentalMaterial3Api
fun TooltipScope.RichTooltipAndroid(
modifier: Modifier = Modifier,
title: (@Composable () -> Unit)? = null,
action: (@Composable () -> Unit)? = null,
caretSize: DpSize = DpSize.Unspecified,
shape: Shape = TooltipDefaults.richTooltipContainerShape,
colors: RichTooltipColors = TooltipDefaults.richTooltipColors(),
tonalElevation: Dp = ElevationTokens.Level0,
shadowElevation: Dp = RichTooltipTokens.ContainerElevation,
text: @Composable () -> Unit,
) =
RichTooltip(
modifier = modifier,
title = title,
action = action,
caretSize = caretSize,
maxWidth = TooltipDefaults.richTooltipMaxWidth,
shape = shape,
colors = colors,
tonalElevation = tonalElevation,
shadowElevation = shadowElevation,
text = text,
)
Parameters
modifier | the Modifier to be applied to the tooltip. |
title | An optional title for the tooltip. |
action | An optional action for the tooltip. |
caretSize | DpSize for the caret of the tooltip, if a default caret is desired with a specific dimension. Please see TooltipDefaults.caretSize to see the default dimensions. Pass in Dp.Unspecified for this parameter if no caret is desired. |
shape | the Shape that should be applied to the tooltip container. |
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. |
text | the composable that will be used to populate the rich tooltip's text. |
Android
Deprecated Maintained for binary compatibility.
@Composable
@ExperimentalMaterial3Api
fun TooltipScope.RichTooltipAndroid(
modifier: Modifier = Modifier,
title: (@Composable () -> Unit)? = null,
action: (@Composable () -> Unit)? = null,
caretSize: DpSize = DpSize.Unspecified,
maxWidth: Dp = TooltipDefaults.richTooltipMaxWidth,
shape: Shape = TooltipDefaults.richTooltipContainerShape,
colors: RichTooltipColors = TooltipDefaults.richTooltipColors(),
tonalElevation: Dp = ElevationTokens.Level0,
shadowElevation: Dp = RichTooltipTokens.ContainerElevation,
text: @Composable () -> Unit,
)
Parameters
modifier | the Modifier to be applied to the tooltip. |
title | An optional title for the tooltip. |
action | An optional action for the tooltip. |
caretSize | DpSize for the caret of the tooltip, if a default caret is desired with a specific dimension. Please see TooltipDefaults.caretSize to see the default dimensions. Pass in Dp.Unspecified for this parameter if no caret is desired. |
maxWidth | the maximum width for the rich tooltip |
shape | the Shape that should be applied to the tooltip container. |
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. |
text | the 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