public object RemoteButtonDefaults
Contains the default values used by RemoteButton
Properties
shape
public val shape: RemoteRoundedCornerShape
Recommended RemoteRoundedCornerShape for RemoteButton.
compactButtonShape
public val compactButtonShape: RemoteRoundedCornerShape
Recommended RemoteRoundedCornerShape for RemoteCompactButton.
Height
public val Height: RemoteDp
The default minimum height applied for the RemoteButton.
Width
public val Width: RemoteDp
The default minimum width applied for the RemoteButton.
IconSpacing
public val IconSpacing: RemoteDp
The default size of the spacing between an icon and a text when they are used inside a RemoteButton.
ExtraSmallIconSize
public val ExtraSmallIconSize: RemoteDp
The recommended icon size when used in RemoteCompactButtons containing both icon and text.
SmallIconSize
public val SmallIconSize: RemoteDp
The recommended icon size when used in CompactButtons containing icon-only content.
IconSize
public val IconSize: RemoteDp
The recommended default size for icons when used inside a RemoteButton.
LargeIconSize
public val LargeIconSize: RemoteDp
The recommended icon size when used in RemoteButtons for icons such as an app icon
ButtonHorizontalPadding
public val ButtonHorizontalPadding: RemoteDp
The recommended horizontal padding used by RemoteButton by default
ButtonVerticalPadding
public val ButtonVerticalPadding: RemoteDp
The recommended vertical padding used by RemoteButton by default
ContentPadding
public val ContentPadding: RemotePaddingValues
The default content padding used by RemoteButton
CompactButtonHeight
public val CompactButtonHeight: RemoteDp
The height applied for the RemoteCompactButton. This includes a visible button height of 32.dp and 8.dp of padding above and below the button in order to meet accessibility guidelines that request a minimum of 48.dp height and width of tappable area.
Note that you can override it by adjusting Modifier.height and Modifier.padding directly on RemoteCompactButton.
CompactButtonContentPadding
public val CompactButtonContentPadding: RemotePaddingValues
The default content padding used by CompactButton
DisabledContainerAlpha
public val DisabledContainerAlpha: RemoteFloat
The default alpha applied to the container when the button is disabled.
Functions
buttonColors
@Composable
public fun buttonColors(): RemoteButtonColors
Creates a RemoteButtonColors that represents the default background and content colors used in a RemoteButton.
buttonColors
@Composable
public fun buttonColors(
containerColor: RemoteColor? = null,
contentColor: RemoteColor? = null,
secondaryContentColor: RemoteColor? = null,
iconColor: RemoteColor? = null,
disabledContainerColor: RemoteColor? = null,
disabledContentColor: RemoteColor? = null,
disabledSecondaryContentColor: RemoteColor? = null,
disabledIconColor: RemoteColor? = null,
): RemoteButtonColors
Creates a RemoteButtonColors that represents the default background and content colors used in a RemoteButton.
Parameters
| containerColor | The background color of this RemoteButton when enabled |
| contentColor | The content color of this RemoteButton when enabled |
| secondaryContentColor | The content color of this RemoteButton when enabled |
| iconColor | The content color of this RemoteButton when enabled |
| disabledContainerColor | The background color of this RemoteButton when not enabled |
| disabledContentColor | The content color of this RemoteButton when not enabled |
| disabledSecondaryContentColor | The content color of this RemoteButton when not enabled |
| disabledIconColor | The content color of this RemoteButton when not enabled |
buttonWithContainerPainterColors
@Composable
public fun buttonWithContainerPainterColors(): RemoteButtonColors
Creates a RemoteButtonColors for the content in a RemoteButton with an image container painter.
containerPainter
@Composable
public fun containerPainter(
image: RemotePainter,
scrim: RemoteBrush? = image.intrinsicSize?.let { scrimBrush(it) },
alpha: RemoteFloat = DefaultAlpha.rf,
): RemotePainter
Creates a RemotePainter for the background of a RemoteButton with container painter, that displays an image with a scrim on top to make sure that any content above the background will be legible.
An Image background is a means to reinforce the meaning of information in a Button. Buttons should have a content color that contrasts with the background image and scrim.
Parameters
| image | The RemotePainter to use to draw the container background of the RemoteButton. |
| scrim | The RemoteBrush to use to paint a scrim over the container image to ensure that any text drawn over the image is legible. |
| alpha | Opacity of the container image painter and scrim. |
disabledContainerPainter
@Composable
public fun disabledContainerPainter(containerPainter: RemotePainter): RemotePainter
Creates a RemotePainter for the disabled background of a RemoteButton with container painter - draws the containerPainter with an alpha applied to achieve a disabled effect.
An Image background is a means to reinforce the meaning of information in a Button. Buttons should have a content color that contrasts with the background image and scrim.
Parameters
| containerPainter | The RemotePainter to use to draw the container background of the RemoteButton. |
scrimBrush
@Composable
public fun scrimBrush(size: RemoteSize): RemoteBrush
Creates a RemoteBrush for the recommended scrim drawn on top of image container backgrounds.