ElevatedCard
Material Design elevated card.
Elevated cards contain content and actions that relate information about a subject. They have a drop shadow, providing more separation from the background than filled cards, but less than outlined cards.
This ElevatedCard does not handle input events - see the other ElevatedCard overloads if you want a clickable or selectable ElevatedCard.
Elevated card sample:
Parameters
the Modifier to be applied to this card
defines the shape of this card's container and shadow (when using elevation)
CardColors that will be used to resolve the color(s) used for this card in different states. See CardDefaults.elevatedCardElevation.
CardElevation used to resolve the elevation for this card in different states. This controls the size of the shadow below the card. Additionally, when the container color is ColorScheme.surface, this controls the amount of primary color applied as an overlay. See also: Surface.
Samples
androidx.compose.material3.samples.ElevatedCardSampleMaterial Design elevated card.
Elevated cards contain content and actions that relate information about a subject. They have a drop shadow, providing more separation from the background than filled cards, but less than outlined cards.
This ElevatedCard handles click events, calling its onClick lambda.
Clickable elevated card sample:
Parameters
called when this card is clicked
the Modifier to be applied to this card
controls the enabled state of this card. When false
, this component will not respond to user input, and it will appear visually disabled and disabled to accessibility services.
defines the shape of this card's container and shadow (when using elevation)
CardColors that will be used to resolve the color(s) used for this card in different states. See CardDefaults.elevatedCardElevation.
CardElevation used to resolve the elevation for this card in different states. This controls the size of the shadow below the card. Additionally, when the container color is ColorScheme.surface, this controls the amount of primary color applied as an overlay. See also: Surface.
an optional hoisted MutableInteractionSource for observing and emitting Interactions for this card. You can use this to change the card's appearance or preview the card in different states. Note that if null
is provided, interactions will still happen internally.