object TooltipDefaults
Tooltip defaults that contain default values for both PlainTooltip and RichTooltip
Properties
val plainTooltipContainerShape: Shape
The default Shape for a PlainTooltip's container.
val plainTooltipContainerColor: Color
The default Color for a PlainTooltip's container.
val plainTooltipContentColor: Color
The default Color for the content within the PlainTooltip.
val richTooltipContainerShape: Shape
The default Shape for a RichTooltip's container.
val caretSize: DpSize
The default DpSize for tooltip carets.
val plainTooltipMaxWidth: Dp
The default maximum width for plain tooltips.
val richTooltipMaxWidth: Dp
The default maximum width for rich tooltips.
Functions
caretShape
fun caretShape() = DefaultCaretShape
The default caret shape used for tooltips and is TooltipDefaults.caretSize dimensions.
caretShape
fun caretShape(caretSize: DpSize = TooltipDefaults.caretSize): Shape
The caret shape used for tooltips.
Parameters
| caretSize | DpSize used to draw the caret shape |
@Composable fun richTooltipColors() = MaterialTheme.colorScheme.defaultRichTooltipColors
Method to create a RichTooltipColors for RichTooltip using RichTooltipTokens to obtain the default colors.
richTooltipColors
@Composable
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
@Composable
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
@Composable
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
@Composable
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
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. |