RemoteIconButtonDefaults

object RemoteIconButtonDefaults


Contains the default values used by RemoteIconButton.

Summary

Public functions

RemoteIconButtonShapes

Returns a RemoteIconButtonShapes with an animation between two RemoteCornerBasedShapes when pressed.

RemoteIconButtonColors

Returns a RemoteIconButtonColors with the colors for a filled RemoteIconButton - by default, a colored background with a contrasting icon color.

RemoteIconButtonColors
@Composable
@RemoteComposable
filledIconButtonColors(
    containerColor: RemoteColor?,
    contentColor: RemoteColor?,
    disabledContainerColor: RemoteColor?,
    disabledContentColor: RemoteColor?
)

Returns a RemoteIconButtonColors with the colors for a filled RemoteIconButton - by default, a colored background with a contrasting icon color.

RemoteIconButtonColors

Returns a RemoteIconButtonColors for a filled tonal RemoteIconButton with a muted background and contrasting content color.

RemoteIconButtonColors
@Composable
@RemoteComposable
filledTonalIconButtonColors(
    containerColor: RemoteColor?,
    contentColor: RemoteColor?,
    disabledContainerColor: RemoteColor?,
    disabledContentColor: RemoteColor?
)

Returns a RemoteIconButtonColors for a filled tonal RemoteIconButton with a muted background and contrasting content color.

RemoteIconButtonColors

Returns a RemoteIconButtonColors with higher chroma container colors for RemoteIconButton.

RemoteIconButtonColors
@Composable
@RemoteComposable
filledVariantIconButtonColors(
    containerColor: RemoteColor?,
    contentColor: RemoteColor?,
    disabledContainerColor: RemoteColor?,
    disabledContentColor: RemoteColor?
)

Returns a RemoteIconButtonColors with higher chroma container colors for RemoteIconButton.

RemoteIconButtonColors

Returns a RemoteIconButtonColors for an icon button - by default, a transparent background with contrasting content color.

RemoteIconButtonColors
@Composable
@RemoteComposable
iconButtonColors(
    containerColor: RemoteColor?,
    contentColor: RemoteColor?,
    disabledContainerColor: RemoteColor?,
    disabledContentColor: RemoteColor?
)

Returns a RemoteIconButtonColors for an icon button - by default, a transparent background with contrasting content color.

RemoteDp
iconSizeFor(buttonSize: RemoteDp)

Recommended icon size for a given icon button size.

RemoteIconButtonColors

Returns a RemoteIconButtonColors with a transparent background for outlined RemoteIconButton.

RemoteIconButtonColors
@Composable
@RemoteComposable
outlinedIconButtonColors(
    contentColor: RemoteColor?,
    disabledContentColor: RemoteColor?
)

Returns a RemoteIconButtonColors with a transparent background for outlined RemoteIconButton.

RemoteIconButtonShapes

Returns the default RemoteIconButtonShapes for a static RemoteIconButton.

RemoteIconButtonShapes

Returns a RemoteIconButtonShapes for a static RemoteIconButton.

Public properties

RemoteDp

The default size applied for buttons.

RemoteDp

The default size of an icon when used inside an icon button of size DefaultButtonSize.

RemoteFloat

Recommended alpha to apply to a RemoteIconButton with Image content when disabled

RemoteDp

The recommended background size of an extra small, compact button.

RemoteDp

The recommended size for a large button.

RemoteDp

The size of an icon when used inside an icon button with size LargeButtonSize.

RemoteDp

The recommended size for a small button.

RemoteDp

The recommended size of an icon when used inside an icon button with size SmallButtonSize or ExtraSmallButtonSize.

RemoteCornerBasedShape

Recommended pressed RemoteShape for RemoteIconButton.

RemoteRoundedCornerShape

Recommended RemoteShape for RemoteIconButton.

Public functions

animatedShapes

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun animatedShapes(
    shape: RemoteCornerBasedShape = this.shape,
    pressedShape: RemoteCornerBasedShape = this.pressedShape
): RemoteIconButtonShapes

Returns a RemoteIconButtonShapes with an animation between two RemoteCornerBasedShapes when pressed.

The press animation requires both shapes to be RemoteRoundedCornerShapes. It is driven by touch events on the player, and is not shown by players that don't dispatch them.

Example of an icon button animated when pressed:

import androidx.compose.remote.creation.compose.action.hostAction
import androidx.compose.remote.creation.compose.modifier.RemoteModifier
import androidx.compose.remote.creation.compose.modifier.size
import androidx.compose.remote.creation.compose.state.rs
import androidx.wear.compose.remote.material3.RemoteIcon
import androidx.wear.compose.remote.material3.RemoteIconButton
import androidx.wear.compose.remote.material3.RemoteIconButtonDefaults
import androidx.wear.compose.remote.material3.previews.utils.TestImageVectors

RemoteIconButton(
    onClick = hostAction("volume_up".rs),
    modifier = modifier,
    shapes = RemoteIconButtonDefaults.animatedShapes(),
    colors = RemoteIconButtonDefaults.filledIconButtonColors(),
) {
    RemoteIcon(
        imageVector = TestImageVectors.VolumeUp,
        contentDescription = null,
        modifier = RemoteModifier.size(RemoteIconButtonDefaults.DefaultIconSize),
    )
}
Parameters
shape: RemoteCornerBasedShape = this.shape

The normal shape of the RemoteIconButton.

pressedShape: RemoteCornerBasedShape = this.pressedShape

The pressed shape of the RemoteIconButton.

Returns
RemoteIconButtonShapes

a RemoteIconButtonShapes with the configured resting and pressed shapes

filledIconButtonColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun filledIconButtonColors(): RemoteIconButtonColors

Returns a RemoteIconButtonColors with the colors for a filled RemoteIconButton - by default, a colored background with a contrasting icon color.

Returns
RemoteIconButtonColors

a RemoteIconButtonColors with the default colors for a filled RemoteIconButton

filledIconButtonColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun filledIconButtonColors(
    containerColor: RemoteColor? = null,
    contentColor: RemoteColor? = null,
    disabledContainerColor: RemoteColor? = null,
    disabledContentColor: RemoteColor? = null
): RemoteIconButtonColors

Returns a RemoteIconButtonColors with the colors for a filled RemoteIconButton - by default, a colored background with a contrasting icon color.

Parameters
containerColor: RemoteColor? = null

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

contentColor: RemoteColor? = null

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

disabledContainerColor: RemoteColor? = null

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

disabledContentColor: RemoteColor? = null

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

Returns
RemoteIconButtonColors

a RemoteIconButtonColors with the configured colors for a filled RemoteIconButton

filledTonalIconButtonColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun filledTonalIconButtonColors(): RemoteIconButtonColors

Returns a RemoteIconButtonColors for a filled tonal RemoteIconButton with a muted background and contrasting content color.

Returns
RemoteIconButtonColors

a RemoteIconButtonColors with the default colors for a filled tonal RemoteIconButton

filledTonalIconButtonColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun filledTonalIconButtonColors(
    containerColor: RemoteColor? = null,
    contentColor: RemoteColor? = null,
    disabledContainerColor: RemoteColor? = null,
    disabledContentColor: RemoteColor? = null
): RemoteIconButtonColors

Returns a RemoteIconButtonColors for a filled tonal RemoteIconButton with a muted background and contrasting content color.

Parameters
containerColor: RemoteColor? = null

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

contentColor: RemoteColor? = null

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

disabledContainerColor: RemoteColor? = null

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

disabledContentColor: RemoteColor? = null

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

Returns
RemoteIconButtonColors

a RemoteIconButtonColors with the configured colors for a filled tonal RemoteIconButton

filledVariantIconButtonColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun filledVariantIconButtonColors(): RemoteIconButtonColors

Returns a RemoteIconButtonColors with higher chroma container colors for RemoteIconButton.

Returns
RemoteIconButtonColors

a RemoteIconButtonColors with the default colors for a filled variant RemoteIconButton

filledVariantIconButtonColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun filledVariantIconButtonColors(
    containerColor: RemoteColor? = null,
    contentColor: RemoteColor? = null,
    disabledContainerColor: RemoteColor? = null,
    disabledContentColor: RemoteColor? = null
): RemoteIconButtonColors

Returns a RemoteIconButtonColors with higher chroma container colors for RemoteIconButton.

Parameters
containerColor: RemoteColor? = null

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

contentColor: RemoteColor? = null

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

disabledContainerColor: RemoteColor? = null

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

disabledContentColor: RemoteColor? = null

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

Returns
RemoteIconButtonColors

a RemoteIconButtonColors with the configured colors for a filled variant RemoteIconButton

iconButtonColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun iconButtonColors(): RemoteIconButtonColors

Returns a RemoteIconButtonColors for an icon button - by default, a transparent background with contrasting content color. If the button is disabled then the colors default to RemoteColorScheme.onSurface with suitable alpha values applied.

Returns
RemoteIconButtonColors

a RemoteIconButtonColors with the default colors for a RemoteIconButton

iconButtonColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun iconButtonColors(
    containerColor: RemoteColor? = null,
    contentColor: RemoteColor? = null,
    disabledContainerColor: RemoteColor? = null,
    disabledContentColor: RemoteColor? = null
): RemoteIconButtonColors

Returns a RemoteIconButtonColors for an icon button - by default, a transparent background with contrasting content color. If the button is disabled then the colors default to RemoteColorScheme.onSurface with suitable alpha values applied.

Parameters
containerColor: RemoteColor? = null

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

contentColor: RemoteColor? = null

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

disabledContainerColor: RemoteColor? = null

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

disabledContentColor: RemoteColor? = null

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

Returns
RemoteIconButtonColors

a RemoteIconButtonColors with the configured colors for a RemoteIconButton

iconSizeFor

Added in 1.0.0-alpha16
fun iconSizeFor(buttonSize: RemoteDp): RemoteDp

Recommended icon size for a given icon button size.

Ensures that the minimum recommended icon size is applied.

Examples: for size LargeButtonSize, returns LargeIconSize, for size ExtraSmallButtonSize returns SmallIconSize.

Parameters
buttonSize: RemoteDp

The size of the icon button

Returns
RemoteDp

the recommended icon size in RemoteDp for buttonSize

outlinedIconButtonColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun outlinedIconButtonColors(): RemoteIconButtonColors

Returns a RemoteIconButtonColors with a transparent background for outlined RemoteIconButton.

Returns
RemoteIconButtonColors

a RemoteIconButtonColors with the default colors for an outlined RemoteIconButton

outlinedIconButtonColors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun outlinedIconButtonColors(
    contentColor: RemoteColor? = null,
    disabledContentColor: RemoteColor? = null
): RemoteIconButtonColors

Returns a RemoteIconButtonColors with a transparent background for outlined RemoteIconButton.

Parameters
contentColor: RemoteColor? = null

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

disabledContentColor: RemoteColor? = null

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

Returns
RemoteIconButtonColors

a RemoteIconButtonColors with the configured colors for an outlined RemoteIconButton

shapes

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun shapes(): RemoteIconButtonShapes

Returns the default RemoteIconButtonShapes for a static RemoteIconButton.

Returns
RemoteIconButtonShapes

a RemoteIconButtonShapes with the default static shape

shapes

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun shapes(shape: RemoteShape): RemoteIconButtonShapes

Returns a RemoteIconButtonShapes for a static RemoteIconButton.

Parameters
shape: RemoteShape

The normal shape of the RemoteIconButton.

Returns
RemoteIconButtonShapes

a RemoteIconButtonShapes with the given static shape

Public properties

DefaultButtonSize

Added in 1.0.0-alpha16
val DefaultButtonSize: RemoteDp

The default size applied for buttons.

DefaultIconSize

Added in 1.0.0-alpha16
val DefaultIconSize: RemoteDp

The default size of an icon when used inside an icon button of size DefaultButtonSize. Use iconSizeFor to easily determine the icon size.

DisabledImageOpacity

Added in 1.0.0-alpha16
val DisabledImageOpacity: RemoteFloat

Recommended alpha to apply to a RemoteIconButton with Image content when disabled

ExtraSmallButtonSize

Added in 1.0.0-alpha16
val ExtraSmallButtonSize: RemoteDp

The recommended background size of an extra small, compact button.

LargeButtonSize

Added in 1.0.0-alpha16
val LargeButtonSize: RemoteDp

The recommended size for a large button.

LargeIconSize

Added in 1.0.0-alpha16
val LargeIconSize: RemoteDp

The size of an icon when used inside an icon button with size LargeButtonSize. Use iconSizeFor to easily determine the icon size.

SmallButtonSize

Added in 1.0.0-alpha16
val SmallButtonSize: RemoteDp

The recommended size for a small button.

SmallIconSize

Added in 1.0.0-alpha16
val SmallIconSize: RemoteDp

The recommended size of an icon when used inside an icon button with size SmallButtonSize or ExtraSmallButtonSize. Use iconSizeFor to easily determine the icon size.

pressedShape

val pressedShape: RemoteCornerBasedShape

Recommended pressed RemoteShape for RemoteIconButton.