Class

RemoteShapes

Material surfaces can be displayed in different shapes.

Source set: Android
public class RemoteShapes(
    public val extraSmall: RemoteCornerBasedShape = RemoteShapeDefaults.ExtraSmall,
    public val small: RemoteCornerBasedShape = RemoteShapeDefaults.Small,
    public val medium: RemoteCornerBasedShape = RemoteShapeDefaults.Medium,
    public val large: RemoteCornerBasedShape = RemoteShapeDefaults.Large,
    public val extraLarge: RemoteCornerBasedShape = RemoteShapeDefaults.ExtraLarge,
)

Material surfaces can be displayed in different shapes. Shapes direct attention, identify components, communicate state, and express brand.

The shape scale defines the style of container, offering a range of curved shapes (mostly polygonal). The default Shapes theme for Material3 is rounded rectangles, with various degrees of corner roundness:

  • Extra Small
  • Small
  • Medium
  • Large
  • Extra Large

You can customize the shape system for all components in the RemoteMaterialTheme or you can do it on a per component basis by overriding the shape parameter for that component. For example, by default, buttons use the shape style "large". If your product requires a smaller amount of roundness, you can override the shape parameter with a different shape value like RemoteShapes.small.

Parameters

extraSmall By default, provides RemoteShapeDefaults.ExtraSmall, a RemoteCornerBasedShape with 4dp RemoteCornerSize (used by bundled Cards).
small By default, provides RemoteShapeDefaults.Small, a RemoteCornerBasedShape with 8dp RemoteCornerSize.
medium By default, provides RemoteShapeDefaults.Medium, a RemoteCornerBasedShape with 18dp RemoteCornerSize (used by shape-shifting Buttons and rounded rectangle buttons).
large By default, provides RemoteShapeDefaults.Large, a RemoteCornerBasedShape with 26dp RemoteCornerSize (used by Cards).
extraLarge By default, provides RemoteShapeDefaults.ExtraLarge, a RemoteCornerBasedShape with 36dp RemoteCornerSize.

Last updated: