Start native apps faster with the Composables CLI ->
Object

TooltipDefaults

Tooltip defaults that contain default values for both PlainTooltip and RichTooltip

Source set: Common
public object TooltipDefaults

Tooltip defaults that contain default values for both PlainTooltip and RichTooltip

Properties

plainTooltipContainerShape

Source set: Common
public val plainTooltipContainerShape: Shape

The default Shape for a PlainTooltip's container.

plainTooltipContainerColor

Source set: Common
public val plainTooltipContainerColor: Color

The default Color for a PlainTooltip's container.

plainTooltipContentColor

Source set: Common
public val plainTooltipContentColor: Color

The default Color for the content within the PlainTooltip.

richTooltipContainerShape

Source set: Common
public val richTooltipContainerShape: Shape

The default Shape for a RichTooltip's container.

caretSize

Source set: Common
public val caretSize: DpSize = DpSize(16.dp, 8.dp)

The default DpSize for tooltip carets.

plainTooltipMaxWidth

Source set: Common
public val plainTooltipMaxWidth: Dp = 200.dp

The default maximum width for plain tooltips.

richTooltipMaxWidth

Source set: Common
public val richTooltipMaxWidth: Dp = 320.dp

The default maximum width for rich tooltips.

Functions

caretShape

Source set: Common
public fun caretShape(): DefaultTooltipCaretShape

The default caret shape used for tooltips and is caretSize dimensions.

caretShape

Source set: Common
public fun caretShape(caretSize: DpSize = TooltipDefaults.caretSize): Shape

The caret shape used for tooltips.

Parameters

caretSize DpSize used to draw the caret shape

richTooltipColors

Source set: Common
@Composable
    public fun richTooltipColors(): RichTooltipColors

Method to create a RichTooltipColors for RichTooltip using RichTooltipTokens to obtain the default colors.

richTooltipColors

Source set: Common
@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

Source set: Common
@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

Source set: Common
@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

Source set: Common
@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

Source set: Common
@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.