public final class Shapes


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. The default Shapes theme for Material3 is rounded rectangles, with various degrees of corner roundness:

  • None

  • Extra Small

  • Small

  • Medium

  • Large

  • Extra Large

  • Full

You can customize the shape of any component 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 Shapes.small.

Summary

Public constructors

Default Shape theme.

Public methods

final @NonNull ModifiersBuilders.Corner

The extra large, almost round corner with 32dp corner radius.

final @NonNull ModifiersBuilders.Corner

The extra small, mostly square corner with 4dp corner radius.

final @NonNull ModifiersBuilders.Corner

Full corner radius, i.e. round shape.

final @NonNull ModifiersBuilders.Corner

The large, mostly round corner with 26dp corner radius.

final @NonNull ModifiersBuilders.Corner

The medium corner with 18dp corner radius.

final @NonNull ModifiersBuilders.Corner

No corner radius, i.e. square shape.

final @NonNull ModifiersBuilders.Corner

The small, almost square corner with 8dp corner radius.

Public constructors

Shapes

Added in 1.3.0-alpha05
public Shapes()

Default Shape theme.

Public methods

getExtraLarge

Added in 1.3.0-alpha05
public final @NonNull ModifiersBuilders.Corner getExtraLarge()

The extra large, almost round corner with 32dp corner radius.

getExtraSmall

Added in 1.3.0-alpha05
public final @NonNull ModifiersBuilders.Corner getExtraSmall()

The extra small, mostly square corner with 4dp corner radius.

getFull

Added in 1.3.0-alpha05
public final @NonNull ModifiersBuilders.Corner getFull()

Full corner radius, i.e. round shape.

getLarge

Added in 1.3.0-alpha05
public final @NonNull ModifiersBuilders.Corner getLarge()

The large, mostly round corner with 26dp corner radius.

getMedium

Added in 1.3.0-alpha05
public final @NonNull ModifiersBuilders.Corner getMedium()

The medium corner with 18dp corner radius.

getNone

Added in 1.3.0-alpha05
public final @NonNull ModifiersBuilders.Corner getNone()

No corner radius, i.e. square shape.

getSmall

Added in 1.3.0-alpha05
public final @NonNull ModifiersBuilders.Corner getSmall()

The small, almost square corner with 8dp corner radius.