public object RemoteIconButtonDefaults
Contains the default values used by RemoteIconButton.
Properties
shape
public val shape: RemoteRoundedCornerShape = RemoteCircleShape
Recommended RemoteShape for RemoteIconButton.
pressedShape
public val pressedShape: RemoteCornerBasedShape
Recommended pressed RemoteShape for RemoteIconButton.
DisabledImageOpacity
public val DisabledImageOpacity: RemoteFloat = DisabledContentAlpha.rf
Recommended alpha to apply to a RemoteIconButton with Image content when disabled
SmallIconSize
public val SmallIconSize: RemoteDp = 24.rdp
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.
DefaultIconSize
public val DefaultIconSize: RemoteDp = 26.rdp
The default size of an icon when used inside an icon button of size DefaultButtonSize. Use iconSizeFor to easily determine the icon size.
LargeIconSize
public val LargeIconSize: RemoteDp = 32.rdp
The size of an icon when used inside an icon button with size LargeButtonSize. Use iconSizeFor to easily determine the icon size.
SmallButtonSize
public val SmallButtonSize: RemoteDp = 48.rdp
The recommended size for a small button.
DefaultButtonSize
public val DefaultButtonSize: RemoteDp = 52.rdp
The default size applied for buttons.
LargeButtonSize
public val LargeButtonSize: RemoteDp = 60.rdp
The recommended size for a large button.
ExtraSmallButtonSize
public val ExtraSmallButtonSize: RemoteDp = 32.rdp
The recommended background size of an extra small, compact button.
Functions
shapes
@Composable @RemoteComposable public fun shapes(): RemoteIconButtonShapes
Returns the default RemoteIconButtonShapes for a static RemoteIconButton.
Return
a RemoteIconButtonShapes with the default static shape
shapes
@Composable
public fun shapes(shape: RemoteShape): RemoteIconButtonShapes
Returns a RemoteIconButtonShapes for a static RemoteIconButton.
Parameters
| shape | The normal shape of the RemoteIconButton. |
Return
a RemoteIconButtonShapes with the given static shape
animatedShapes
@Composable
public 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:
Parameters
| shape | The normal shape of the RemoteIconButton. |
| pressedShape | The pressed shape of the RemoteIconButton. |
Return
a RemoteIconButtonShapes with the configured resting and pressed shapes
filledIconButtonColors
@Composable
public fun filledIconButtonColors(): RemoteIconButtonColors
Returns a RemoteIconButtonColors with the colors for a filled RemoteIconButton - by default, a colored background with a contrasting icon color.
Return
a RemoteIconButtonColors with the default colors for a filled RemoteIconButton
filledIconButtonColors
@Composable
public 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 | The background color of this icon button when enabled, or null to use the theme default. |
| contentColor | The color of this icon when enabled, or null to use the theme default. |
| disabledContainerColor | The background color of this icon button when not enabled, or null to use the theme default. |
| disabledContentColor | The color of this icon when not enabled, or null to use the theme default. |
Return
a RemoteIconButtonColors with the configured colors for a filled RemoteIconButton
filledTonalIconButtonColors
@Composable
public fun filledTonalIconButtonColors(): RemoteIconButtonColors
Returns a RemoteIconButtonColors for a filled tonal RemoteIconButton with a muted background and contrasting content color.
Return
a RemoteIconButtonColors with the default colors for a filled tonal RemoteIconButton
filledTonalIconButtonColors
@Composable
public 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 | The background color of this icon button when enabled, or null to use the theme default. |
| contentColor | The color of this icon when enabled, or null to use the theme default. |
| disabledContainerColor | The background color of this icon button when not enabled, or null to use the theme default. |
| disabledContentColor | The color of this icon when not enabled, or null to use the theme default. |
Return
a RemoteIconButtonColors with the configured colors for a filled tonal RemoteIconButton
filledVariantIconButtonColors
@Composable
public fun filledVariantIconButtonColors(): RemoteIconButtonColors
Returns a RemoteIconButtonColors with higher chroma container colors for RemoteIconButton.
Return
a RemoteIconButtonColors with the default colors for a filled variant RemoteIconButton
filledVariantIconButtonColors
@Composable
public 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 | The background color of this icon button when enabled, or null to use the theme default. |
| contentColor | The color of this icon when enabled, or null to use the theme default. |
| disabledContainerColor | The background color of this icon button when not enabled, or null to use the theme default. |
| disabledContentColor | The color of this icon when not enabled, or null to use the theme default. |
Return
a RemoteIconButtonColors with the configured colors for a filled variant RemoteIconButton
outlinedIconButtonColors
@Composable
public fun outlinedIconButtonColors(): RemoteIconButtonColors
Returns a RemoteIconButtonColors with a transparent background for outlined RemoteIconButton.
Return
a RemoteIconButtonColors with the default colors for an outlined RemoteIconButton
outlinedIconButtonColors
@Composable
public fun outlinedIconButtonColors(
contentColor: RemoteColor? = null,
disabledContentColor: RemoteColor? = null,
): RemoteIconButtonColors
Returns a RemoteIconButtonColors with a transparent background for outlined RemoteIconButton.
Parameters
| contentColor | The color of this icon button when enabled, or null to use the theme default. |
| disabledContentColor | The color of this icon when not enabled, or null to use the theme default. |
Return
a RemoteIconButtonColors with the configured colors for an outlined RemoteIconButton
iconButtonColors
@Composable
public 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.
Return
a RemoteIconButtonColors with the default colors for a RemoteIconButton
iconButtonColors
@Composable
public 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 | The background color of this icon button when enabled, or null to use the theme default. |
| contentColor | The content color of this icon button when enabled, or null to use the theme default. |
| disabledContainerColor | The background color of this icon button when not enabled, or null to use the theme default. |
| disabledContentColor | The content color of this icon button when not enabled, or null to use the theme default. |
Return
a RemoteIconButtonColors with the configured colors for a RemoteIconButton
iconSizeFor
public 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 | The size of the icon button |
Return
the recommended icon size in RemoteDp for buttonSize