public object TooltipDefaults
Tooltip defaults that contain default values for both PlainTooltip and RichTooltip
Properties
plainTooltipContainerShape
public val plainTooltipContainerShape: Shape
The default Shape for a PlainTooltip's container.
plainTooltipContainerColor
public val plainTooltipContainerColor: Color
The default Color for a PlainTooltip's container.
plainTooltipContentColor
public val plainTooltipContentColor: Color
The default Color for the content within the PlainTooltip.
richTooltipContainerShape
public val richTooltipContainerShape: Shape
The default Shape for a RichTooltip's container.
caretSize
public val caretSize: DpSize = DpSize(16.dp, 8.dp)
The default DpSize for tooltip carets.
plainTooltipMaxWidth
public val plainTooltipMaxWidth: Dp = 200.dp
The default maximum width for plain tooltips.
richTooltipMaxWidth
public val richTooltipMaxWidth: Dp = 320.dp
The default maximum width for rich tooltips.
Functions
caretShape
public fun caretShape(): DefaultTooltipCaretShape
The default caret shape used for tooltips and is caretSize dimensions.
caretShape
public fun caretShape(caretSize: DpSize = TooltipDefaults.caretSize): Shape
The caret shape used for tooltips.
Parameters
| caretSize | DpSize used to draw the caret shape |
richTooltipColors
@Composable
public fun richTooltipColors(): RichTooltipColors
Method to create a RichTooltipColors for RichTooltip using RichTooltipTokens to obtain the default colors.
richTooltipColors
@Composable
public fun richTooltipColors(
containerColor: Color = Color.Unspecified,
contentColor: Color = Color.Unspecified,
titleContentColor: Color = Color.Unspecified,
actionContentColor: Color = Color.Unspecified,
): RichTooltipColors
Method to create a RichTooltipColors for RichTooltip using RichTooltipTokens to obtain the default colors.
rememberPlainTooltipPositionProvider
@Deprecated(
"Deprecated in favor of rememberTooltipPositionProvider API.",
replaceWith =
ReplaceWith("rememberTooltipPositionProvider(spacingBetweenTooltipAndAnchor)"),
level = DeprecationLevel.WARNING,
)
@Composable
public fun rememberPlainTooltipPositionProvider(
spacingBetweenTooltipAndAnchor: Dp = SpacingBetweenTooltipAndAnchor
): PopupPositionProvider
PopupPositionProvider that should be used with PlainTooltip. It correctly positions the tooltip in respect to the anchor content.
Parameters
| spacingBetweenTooltipAndAnchor | the spacing between the tooltip and the anchor content. |
rememberRichTooltipPositionProvider
@Deprecated(
"Deprecated in favor of rememberTooltipPositionProvider API.",
replaceWith =
ReplaceWith("rememberTooltipPositionProvider(spacingBetweenTooltipAndAnchor)"),
level = DeprecationLevel.WARNING,
)
@Composable
public fun rememberRichTooltipPositionProvider(
spacingBetweenTooltipAndAnchor: Dp = SpacingBetweenTooltipAndAnchor
): PopupPositionProvider
PopupPositionProvider that should be used with RichTooltip. It correctly positions the tooltip in respect to the anchor content.
Parameters
| spacingBetweenTooltipAndAnchor | the spacing between the tooltip and the anchor content. |
rememberTooltipPositionProvider
@Deprecated(
"Deprecated in favor of rememberTooltipPositionProvider API that " +
"takes a preferred positioning. Please use rememberTooltipPositionProvider with " +
"TooltipAnchorPosition.Above if this same behavior is desired.",
replaceWith =
ReplaceWith(
"rememberTooltipPositionProvider(TooltipAnchorPosition.ABOVE, spacingBetweenTooltipAndAnchor)"
),
level = DeprecationLevel.WARNING,
)
@Composable
public fun rememberTooltipPositionProvider(
spacingBetweenTooltipAndAnchor: Dp = SpacingBetweenTooltipAndAnchor
): PopupPositionProvider
PopupPositionProvider that should be used with either RichTooltip or PlainTooltip. It correctly positions the tooltip in respect to the anchor content.
Parameters
| spacingBetweenTooltipAndAnchor | the spacing between the tooltip and the anchor content. |
rememberTooltipPositionProvider
@Composable
public fun rememberTooltipPositionProvider(
positioning: TooltipAnchorPosition,
spacingBetweenTooltipAndAnchor: Dp = SpacingBetweenTooltipAndAnchor,
): PopupPositionProvider
PopupPositionProvider that should be used with either RichTooltip or PlainTooltip. It correctly positions the tooltip in respect to the anchor content.
Parameters
| positioning | TooltipAnchorPosition that determines where the tooltip is placed relative to the anchor. |
| spacingBetweenTooltipAndAnchor | the spacing between the tooltip and the anchor content. |