Shapes
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 |
|---|
Shapes()Default Shape theme. |
Public methods |
|
|---|---|
final @NonNull ModifiersBuilders.Corner |
The extra large, almost round corner with |
final @NonNull ModifiersBuilders.Corner |
The extra small, mostly square corner with |
final @NonNull ModifiersBuilders.Corner |
getFull()Full corner radius, i.e. round shape. |
final @NonNull ModifiersBuilders.Corner |
getLarge()The large, mostly round corner with |
final @NonNull ModifiersBuilders.Corner |
The medium corner with |
final @NonNull ModifiersBuilders.Corner |
getNone()No corner radius, i.e. square shape. |
final @NonNull ModifiersBuilders.Corner |
getSmall()The small, almost square corner with |
Public methods
getExtraLarge
public final @NonNull ModifiersBuilders.Corner getExtraLarge()
The extra large, almost round corner with 36dp corner radius.
getExtraSmall
public final @NonNull ModifiersBuilders.Corner getExtraSmall()
The extra small, mostly square corner with 4dp corner radius.
getFull
public final @NonNull ModifiersBuilders.Corner getFull()
Full corner radius, i.e. round shape.
getLarge
public final @NonNull ModifiersBuilders.Corner getLarge()
The large, mostly round corner with 26dp corner radius.
getMedium
public final @NonNull ModifiersBuilders.Corner getMedium()
The medium corner with 18dp corner radius.
getNone
public final @NonNull ModifiersBuilders.Corner getNone()
No corner radius, i.e. square shape.
getSmall
public final @NonNull ModifiersBuilders.Corner getSmall()
The small, almost square corner with 8dp corner radius.