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
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.

RemotePainter
@Composable
containerPainter(
    image: RemotePainter,
    scrim: RemoteBrush?,
    alpha: RemoteFloat
)

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.

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 CompactButton

RemoteDp

The height applied for the 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 CompactButtons 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-alpha01
@Composable
fun buttonColors(): RemoteButtonColors

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

buttonColors

Added in 1.0.0-alpha01
@Composable
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

contentColor: RemoteColor? = null

The content color of this RemoteButton when enabled

secondaryContentColor: RemoteColor? = null

The content color of this RemoteButton when enabled

iconColor: RemoteColor? = null

The content color of this RemoteButton when enabled

disabledContainerColor: RemoteColor? = null

The background color of this RemoteButton when not enabled

disabledContentColor: RemoteColor? = null

The content color of this RemoteButton when not enabled

disabledSecondaryContentColor: RemoteColor? = null

The content color of this RemoteButton when not enabled

disabledIconColor: RemoteColor? = null

The content color of this RemoteButton when not enabled

buttonWithContainerPainterColors

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

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

containerPainter

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

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

scrim: RemoteBrush? = image.intrinsicSize?.let { scrimBrush(it) }

The RemoteBrush to use to paint a scrim over the container image to ensure that any text drawn over the image is legible.

alpha: RemoteFloat = DefaultAlpha.rf

Opacity of the container image painter and scrim.

disabledContainerPainter

Added in 1.0.0-alpha01
@Composable
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.

scrimBrush

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

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

Public properties

ButtonHorizontalPadding

Added in 1.0.0-alpha01
val ButtonHorizontalPaddingRemoteDp

The recommended horizontal padding used by RemoteButton by default

ButtonVerticalPadding

Added in 1.0.0-alpha01
val ButtonVerticalPaddingRemoteDp

The recommended vertical padding used by RemoteButton by default

CompactButtonContentPadding

Added in 1.0.0-alpha01
val CompactButtonContentPaddingRemotePaddingValues

The default content padding used by CompactButton

CompactButtonHeight

Added in 1.0.0-alpha01
val CompactButtonHeightRemoteDp

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.

ContentPadding

Added in 1.0.0-alpha01
val ContentPaddingRemotePaddingValues

The default content padding used by RemoteButton

DisabledContainerAlpha

Added in 1.0.0-alpha01
val DisabledContainerAlphaRemoteFloat

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

ExtraSmallIconSize

Added in 1.0.0-alpha01
val ExtraSmallIconSizeRemoteDp

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

Height

Added in 1.0.0-alpha01
val HeightRemoteDp

The default minimum height applied for the RemoteButton.

IconSize

Added in 1.0.0-alpha01
val IconSizeRemoteDp

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

IconSpacing

Added in 1.0.0-alpha01
val IconSpacingRemoteDp

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-alpha01
val LargeIconSizeRemoteDp

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

SmallIconSize

Added in 1.0.0-alpha01
val SmallIconSizeRemoteDp

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

Width

Added in 1.0.0-alpha01
val WidthRemoteDp

The default minimum width applied for the RemoteButton.