Material Design shape.

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

![Shape

  • image](https://developer.android.com/images/reference/androidx/compose/material/shape.png)

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

Shapes(
    small: CornerBasedShape,
    medium: CornerBasedShape,
    large: CornerBasedShape
)
Cmn

Public functions

Shapes
copy(
    small: CornerBasedShape,
    medium: CornerBasedShape,
    large: CornerBasedShape
)

Returns a copy of this Shapes, optionally overriding some of the values.

Cmn
open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn
open String
Cmn

Public properties

CornerBasedShape

Shape used by large components like ModalDrawer or ModalBottomSheetLayout.

Cmn
CornerBasedShape

Shape used by medium components like Card or AlertDialog.

Cmn
CornerBasedShape

Shape used by small components like Button or Snackbar.

Cmn

Public constructors

Shapes

Shapes(
    small: CornerBasedShape = RoundedCornerShape(4.dp),
    medium: CornerBasedShape = RoundedCornerShape(4.dp),
    large: CornerBasedShape = RoundedCornerShape(0.dp)
)

Public functions

copy

fun copy(
    small: CornerBasedShape = this.small,
    medium: CornerBasedShape = this.medium,
    large: CornerBasedShape = this.large
): Shapes

Returns a copy of this Shapes, optionally overriding some of the values.

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

large

val largeCornerBasedShape

Shape used by large components like ModalDrawer or ModalBottomSheetLayout.

medium

val mediumCornerBasedShape

Shape used by medium components like Card or AlertDialog.

small

val smallCornerBasedShape

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.