object RemoteButtonDefaults


Contains the default values used by RemoteButton

Summary

Public functions

RemoteButtonColors

Creates a RemoteButtonColors that represents the default background and content colors used in a RemoteButton.

RemoteButtonColors
@Composable
@RemoteComposable
buttonColors(
    containerColor: RemoteColor?,
    contentColor: RemoteColor?,
    secondaryContentColor: RemoteColor?,
    iconColor: RemoteColor?,
    disabledContainerColor: RemoteColor?,
    disabledContentColor: RemoteColor?,
    disabledSecondaryContentColor: RemoteColor?,
    disabledIconColor: RemoteColor?
)

Creates a RemoteButtonColors that represents the default background and content colors used in a RemoteButton.

RemoteButtonColors

Creates a RemoteButtonColors for the content in a RemoteButton with an image container painter.

RemoteButtonColors
@Composable
@RemoteComposable
buttonWithContainerPainterColors(
    contentColor: RemoteColor?,
    secondaryContentColor: RemoteColor?,
    iconColor: RemoteColor?,
    disabledContentColor: RemoteColor?,
    disabledSecondaryContentColor: RemoteColor?,
    disabledIconColor: RemoteColor?
)

Creates a RemoteButtonColors for the content in a RemoteButton with an image container painter.

RemoteButtonColors

Creates a RemoteButtonColors with transparent background, the defaults for low emphasis buttons.

RemoteButtonColors
@Composable
@RemoteComposable
childButtonColors(
    contentColor: RemoteColor?,
    secondaryContentColor: RemoteColor?,
    iconColor: RemoteColor?,
    disabledContentColor: RemoteColor?,
    disabledSecondaryContentColor: RemoteColor?,
    disabledIconColor: RemoteColor?
)

Creates a RemoteButtonColors with transparent background, the defaults for low emphasis buttons.

RemotePainter
@Composable
@RemoteComposable
containerPainter(
    image: RemoteImageBitmap,
    scrim: RemoteBrush?,
    alpha: RemoteFloat,
    shape: RemoteShape,
    contentScale: ContentScale
)

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.

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.

RemoteButtonColors

Creates a RemoteButtonColors with a muted background and contrasting content color, the defaults for medium emphasis buttons.

RemoteButtonColors
@Composable
@RemoteComposable
filledTonalButtonColors(
    containerColor: RemoteColor?,
    contentColor: RemoteColor?,
    secondaryContentColor: RemoteColor?,
    iconColor: RemoteColor?,
    disabledContainerColor: RemoteColor?,
    disabledContentColor: RemoteColor?,
    disabledSecondaryContentColor: RemoteColor?,
    disabledIconColor: RemoteColor?
)

Creates a RemoteButtonColors with a muted background and contrasting content color, the defaults for medium emphasis buttons.

RemoteButtonColors

Creates a RemoteButtonColors with higher chroma container colors.

RemoteButtonColors
@Composable
@RemoteComposable
filledVariantButtonColors(
    containerColor: RemoteColor?,
    contentColor: RemoteColor?,
    secondaryContentColor: RemoteColor?,
    iconColor: RemoteColor?,
    disabledContainerColor: RemoteColor?,
    disabledContentColor: RemoteColor?,
    disabledSecondaryContentColor: RemoteColor?,
    disabledIconColor: RemoteColor?
)

Creates a RemoteButtonColors with higher chroma container colors.

RemoteButtonColors

Creates a RemoteButtonColors with a transparent background for outlined buttons.

RemoteButtonColors
@Composable
@RemoteComposable
outlinedButtonColors(
    contentColor: RemoteColor?,
    secondaryContentColor: RemoteColor?,
    iconColor: RemoteColor?,
    disabledContentColor: RemoteColor?,
    disabledSecondaryContentColor: RemoteColor?,
    disabledIconColor: RemoteColor?
)

Creates a RemoteButtonColors with a transparent background for outlined buttons.

RemoteBrush

Creates a RemoteBrush for the recommended scrim drawn on top of image container backgrounds.

RemoteBrush

Creates a RemoteBrush for the recommended scrim drawn on top of image container backgrounds.

Public properties

RemoteDp

The recommended horizontal padding used by RemoteButton by default

RemoteDp

The recommended vertical padding used by RemoteButton by default

RemotePaddingValues

The default content padding used by RemoteCompactButton

RemoteDp

The height applied for the RemoteCompactButton.

RemoteDp

The default size of the spacing between an icon and a text when they are used inside a RemoteCompactButton.

RemotePaddingValues

The default content padding used by RemoteButton

RemoteFloat

The default alpha applied to the container when the button is disabled.

RemoteDp

The recommended icon size when used in RemoteCompactButtons containing both icon and text.

RemoteDp

The default minimum height applied for the RemoteButton.

RemoteDp

The recommended default size for icons when used inside a RemoteButton.

RemoteDp

The default size of the spacing between an icon and a text when they are used inside a RemoteButton.

RemoteDp

The recommended icon size when used in RemoteButtons for icons such as an app icon

RemoteDp

The recommended icon size when used in RemoteCompactButtons containing icon-only content.

RemoteDp

The default minimum width applied for the RemoteButton.

RemoteRoundedCornerShape

Recommended RemoteRoundedCornerShape for RemoteCompactButton.

RemoteRoundedCornerShape

Recommended RemoteRoundedCornerShape for RemoteButton.

Public functions

buttonColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun buttonColors(): RemoteButtonColors

Creates a RemoteButtonColors that represents the default background and content colors used in a RemoteButton.

Returns
RemoteButtonColors

a RemoteButtonColors with the default colors for a filled RemoteButton

buttonColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
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: RemoteColor? = null

The background color of this RemoteButton when enabled, or null to use the theme default.

contentColor: RemoteColor? = null

The content color of this RemoteButton when enabled, or null to use the theme default.

secondaryContentColor: RemoteColor? = null

The secondary content color of this RemoteButton when enabled, used for secondaryLabel content, or null to use the theme default.

iconColor: RemoteColor? = null

The icon color of this RemoteButton when enabled, used for icon content, or null to use the theme default.

disabledContainerColor: RemoteColor? = null

The background color of this RemoteButton when not enabled, or null to use the theme default.

disabledContentColor: RemoteColor? = null

The content color of this RemoteButton when not enabled, or null to use the theme default.

disabledSecondaryContentColor: RemoteColor? = null

The secondary content color of this RemoteButton when not enabled, or null to use the theme default.

disabledIconColor: RemoteColor? = null

The icon color of this RemoteButton when not enabled, or null to use the theme default.

Returns
RemoteButtonColors

a RemoteButtonColors with the configured colors for a filled RemoteButton

buttonWithContainerPainterColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun buttonWithContainerPainterColors(): RemoteButtonColors

Creates a RemoteButtonColors for the content in a RemoteButton with an image container painter.

Returns
RemoteButtonColors

a RemoteButtonColors with the default colors for a RemoteButton with a container painter

buttonWithContainerPainterColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun buttonWithContainerPainterColors(
    contentColor: RemoteColor? = null,
    secondaryContentColor: RemoteColor? = null,
    iconColor: RemoteColor? = null,
    disabledContentColor: RemoteColor? = null,
    disabledSecondaryContentColor: RemoteColor? = null,
    disabledIconColor: RemoteColor? = null
): RemoteButtonColors

Creates a RemoteButtonColors for the content in a RemoteButton with an image container painter.

Parameters
contentColor: RemoteColor? = null

The content color of this RemoteButton when enabled, or null to use the theme default.

secondaryContentColor: RemoteColor? = null

The secondary content color of this RemoteButton when enabled, used for secondaryLabel content, or null to use the theme default.

iconColor: RemoteColor? = null

The icon color of this RemoteButton when enabled, used for icon content, or null to use the theme default.

disabledContentColor: RemoteColor? = null

The content color of this RemoteButton when not enabled, or null to use the theme default.

disabledSecondaryContentColor: RemoteColor? = null

The secondary content color of this RemoteButton when not enabled, or null to use the theme default.

disabledIconColor: RemoteColor? = null

The icon color of this RemoteButton when not enabled, or null to use the theme default.

Returns
RemoteButtonColors

a RemoteButtonColors with the configured colors for a RemoteButton with a container painter

childButtonColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun childButtonColors(): RemoteButtonColors

Creates a RemoteButtonColors with transparent background, the defaults for low emphasis buttons. Use childButtonColors for optional or supplementary actions with the least amount of prominence.

Returns
RemoteButtonColors

a RemoteButtonColors with the default colors for a child RemoteButton

childButtonColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun childButtonColors(
    contentColor: RemoteColor? = null,
    secondaryContentColor: RemoteColor? = null,
    iconColor: RemoteColor? = null,
    disabledContentColor: RemoteColor? = null,
    disabledSecondaryContentColor: RemoteColor? = null,
    disabledIconColor: RemoteColor? = null
): RemoteButtonColors

Creates a RemoteButtonColors with transparent background, the defaults for low emphasis buttons. Use childButtonColors for optional or supplementary actions with the least amount of prominence.

Parameters
contentColor: RemoteColor? = null

The content color of this RemoteButton when enabled, or null to use the theme default.

secondaryContentColor: RemoteColor? = null

The secondary content color of this RemoteButton when enabled, used for secondaryLabel content, or null to use the theme default.

iconColor: RemoteColor? = null

The icon color of this RemoteButton when enabled, used for icon content, or null to use the theme default.

disabledContentColor: RemoteColor? = null

The content color of this RemoteButton when not enabled, or null to use the theme default.

disabledSecondaryContentColor: RemoteColor? = null

The secondary content color of this RemoteButton when not enabled, or null to use the theme default.

disabledIconColor: RemoteColor? = null

The icon color of this RemoteButton when not enabled, or null to use the theme default.

Returns
RemoteButtonColors

a RemoteButtonColors with the configured colors for a child RemoteButton

containerPainter

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun containerPainter(
    image: RemoteImageBitmap,
    scrim: RemoteBrush? = scrimBrush(),
    alpha: RemoteFloat = DefaultAlpha.rf,
    shape: RemoteShape = this.shape,
    contentScale: ContentScale = ContentScale.Crop
): 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: RemoteImageBitmap

The RemoteImageBitmap to use to draw the container background of the RemoteButton.

scrim: RemoteBrush? = scrimBrush()

The RemoteBrush to use to paint a scrim over the container image to ensure that any text drawn over the image is legible, or null if no scrim should be drawn over the image.

alpha: RemoteFloat = DefaultAlpha.rf

Opacity of the container image painter and scrim, from 0.0 (completely transparent) to 1.0 (completely opaque).

shape: RemoteShape = this.shape

Define the container shape.

contentScale: ContentScale = ContentScale.Crop

the rule to apply to scale the image when its size does not match the layout

Returns
RemotePainter

a RemotePainter that draws image with the optional scrim for a RemoteButton

disabledContainerPainter

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
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: RemotePainter

The RemotePainter to use to draw the container background of the RemoteButton.

Returns
RemotePainter

a RemotePainter that draws containerPainter with disabled alpha applied

filledTonalButtonColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun filledTonalButtonColors(): RemoteButtonColors

Creates a RemoteButtonColors with a muted background and contrasting content color, the defaults for medium emphasis buttons.

Returns
RemoteButtonColors

a RemoteButtonColors with the default colors for a filled tonal RemoteButton

filledTonalButtonColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun filledTonalButtonColors(
    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 with a muted background and contrasting content color, the defaults for medium emphasis buttons.

Parameters
containerColor: RemoteColor? = null

The background color of this RemoteButton when enabled, or null to use the theme default.

contentColor: RemoteColor? = null

The content color of this RemoteButton when enabled, or null to use the theme default.

secondaryContentColor: RemoteColor? = null

The secondary content color of this RemoteButton when enabled, used for secondaryLabel content, or null to use the theme default.

iconColor: RemoteColor? = null

The icon color of this RemoteButton when enabled, used for icon content, or null to use the theme default.

disabledContainerColor: RemoteColor? = null

The background color of this RemoteButton when not enabled, or null to use the theme default.

disabledContentColor: RemoteColor? = null

The content color of this RemoteButton when not enabled, or null to use the theme default.

disabledSecondaryContentColor: RemoteColor? = null

The secondary content color of this RemoteButton when not enabled, or null to use the theme default.

disabledIconColor: RemoteColor? = null

The icon color of this RemoteButton when not enabled, or null to use the theme default.

Returns
RemoteButtonColors

a RemoteButtonColors with the configured colors for a filled tonal RemoteButton

filledVariantButtonColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun filledVariantButtonColors(): RemoteButtonColors

Creates a RemoteButtonColors with higher chroma container colors.

Returns
RemoteButtonColors

a RemoteButtonColors with the default colors for a filled variant RemoteButton

filledVariantButtonColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun filledVariantButtonColors(
    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 with higher chroma container colors.

Parameters
containerColor: RemoteColor? = null

The background color of this RemoteButton when enabled, or null to use the theme default.

contentColor: RemoteColor? = null

The content color of this RemoteButton when enabled, or null to use the theme default.

secondaryContentColor: RemoteColor? = null

The secondary content color of this RemoteButton when enabled, used for secondaryLabel content, or null to use the theme default.

iconColor: RemoteColor? = null

The icon color of this RemoteButton when enabled, used for icon content, or null to use the theme default.

disabledContainerColor: RemoteColor? = null

The background color of this RemoteButton when not enabled, or null to use the theme default.

disabledContentColor: RemoteColor? = null

The content color of this RemoteButton when not enabled, or null to use the theme default.

disabledSecondaryContentColor: RemoteColor? = null

The secondary content color of this RemoteButton when not enabled, or null to use the theme default.

disabledIconColor: RemoteColor? = null

The icon color of this RemoteButton when not enabled, or null to use the theme default.

Returns
RemoteButtonColors

a RemoteButtonColors with the configured colors for a filled variant RemoteButton

outlinedButtonColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun outlinedButtonColors(): RemoteButtonColors

Creates a RemoteButtonColors with a transparent background for outlined buttons.

Returns
RemoteButtonColors

a RemoteButtonColors with the default colors for an outlined RemoteButton

outlinedButtonColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun outlinedButtonColors(
    contentColor: RemoteColor? = null,
    secondaryContentColor: RemoteColor? = null,
    iconColor: RemoteColor? = null,
    disabledContentColor: RemoteColor? = null,
    disabledSecondaryContentColor: RemoteColor? = null,
    disabledIconColor: RemoteColor? = null
): RemoteButtonColors

Creates a RemoteButtonColors with a transparent background for outlined buttons.

Parameters
contentColor: RemoteColor? = null

The content color of this RemoteButton when enabled, or null to use the theme default.

secondaryContentColor: RemoteColor? = null

The secondary content color of this RemoteButton when enabled, used for secondaryLabel content, or null to use the theme default.

iconColor: RemoteColor? = null

The icon color of this RemoteButton when enabled, used for icon content, or null to use the theme default.

disabledContentColor: RemoteColor? = null

The content color of this RemoteButton when not enabled, or null to use the theme default.

disabledSecondaryContentColor: RemoteColor? = null

The secondary content color of this RemoteButton when not enabled, or null to use the theme default.

disabledIconColor: RemoteColor? = null

The icon color of this RemoteButton when not enabled, or null to use the theme default.

Returns
RemoteButtonColors

a RemoteButtonColors with the configured colors for an outlined RemoteButton

scrimBrush

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun scrimBrush(): RemoteBrush

Creates a RemoteBrush for the recommended scrim drawn on top of image container backgrounds.

Returns
RemoteBrush

a RemoteBrush for drawing a scrim over an image container background

scrimBrush

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun scrimBrush(size: RemoteSize): RemoteBrush

Creates a RemoteBrush for the recommended scrim drawn on top of image container backgrounds.

Parameters
size: RemoteSize

The size of the scrim brush gradient.

Returns
RemoteBrush

a RemoteBrush for drawing a scrim of the given size over an image container background

Public properties

ButtonHorizontalPadding

Added in 1.0.0-alpha16
val ButtonHorizontalPadding: RemoteDp

The recommended horizontal padding used by RemoteButton by default

ButtonVerticalPadding

Added in 1.0.0-alpha16
val ButtonVerticalPadding: RemoteDp

The recommended vertical padding used by RemoteButton by default

CompactButtonContentPadding

Added in 1.0.0-alpha16
val CompactButtonContentPadding: RemotePaddingValues

The default content padding used by RemoteCompactButton

CompactButtonHeight

Added in 1.0.0-alpha16
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.

CompactButtonIconSpacing

Added in 1.0.0-alpha16
val CompactButtonIconSpacing: RemoteDp

The default size of the spacing between an icon and a text when they are used inside a RemoteCompactButton.

ContentPadding

Added in 1.0.0-alpha16
val ContentPadding: RemotePaddingValues

The default content padding used by RemoteButton

DisabledContainerAlpha

Added in 1.0.0-alpha16
val DisabledContainerAlpha: RemoteFloat

The default alpha applied to the container when the button is disabled.

ExtraSmallIconSize

Added in 1.0.0-alpha16
val ExtraSmallIconSize: RemoteDp

The recommended icon size when used in RemoteCompactButtons containing both icon and text.

Height

Added in 1.0.0-alpha16
val Height: RemoteDp

The default minimum height applied for the RemoteButton.

IconSize

Added in 1.0.0-alpha16
val IconSize: RemoteDp

The recommended default size for icons when used inside a RemoteButton.

IconSpacing

Added in 1.0.0-alpha16
val IconSpacing: RemoteDp

The default size of the spacing between an icon and a text when they are used inside a RemoteButton.

LargeIconSize

Added in 1.0.0-alpha16
val LargeIconSize: RemoteDp

The recommended icon size when used in RemoteButtons for icons such as an app icon

SmallIconSize

Added in 1.0.0-alpha16
val SmallIconSize: RemoteDp

The recommended icon size when used in RemoteCompactButtons containing icon-only content.

Width

Added in 1.0.0-alpha16
val Width: RemoteDp

The default minimum width applied for the RemoteButton.