Shapes
@Immutable data class Shapes
kotlin.Any | |
↳ | androidx.compose.material.Shapes |
Components are grouped into shape categories based on their size. These categories provide a way to change multiple component values at once, by changing the category’s values. Shape categories include:
- Small components
- Medium components
- Large components
See Material shape specification
Summary
Public constructors | |
---|---|
<init>(small: CornerBasedShape = RoundedCornerShape(4.dp), medium: CornerBasedShape = RoundedCornerShape(4.dp), large: CornerBasedShape = RoundedCornerShape(0.dp)) Components are grouped into shape categories based on their size. |
Properties | |
---|---|
CornerBasedShape |
Shape used by large components like ModalDrawerLayout or BottomDrawerLayout. |
CornerBasedShape |
Shape used by medium components like Card or AlertDialog. |
CornerBasedShape |
Public constructors
<init>
Shapes(
small: CornerBasedShape = RoundedCornerShape(4.dp),
medium: CornerBasedShape = RoundedCornerShape(4.dp),
large: CornerBasedShape = RoundedCornerShape(0.dp))
Components are grouped into shape categories based on their size. These categories provide a way to change multiple component values at once, by changing the category’s values. Shape categories include:
- Small components
- Medium components
- Large components
Properties
large
val large: CornerBasedShape
Shape used by large components like ModalDrawerLayout or BottomDrawerLayout.
small
val small: CornerBasedShape
Shape used by small components like Button or Snackbar. Components like FloatingActionButton, ExtendedFloatingActionButton use this shape, but override the corner size to be 50%. TextField uses this shape with overriding the bottom corners to zero.