CardDefaults

object CardDefaults


Default values used for Card

Summary

Public functions

Color

Calculates the default content color for a Card based on the provided color.

Public properties

Color

The default background color of Card.

PaddingValues

Default content padding used for a Card

Shape

The default shape of Card, which determines its corner radius.

Public functions

contentColor

Added in 1.0.0-alpha20
@Composable
fun contentColor(color: Color = CardDefaults.color): Color

Calculates the default content color for a Card based on the provided color.

Parameters
color: Color = CardDefaults.color

the background color of the card

Returns
Color

the calculated content color

Public properties

color

val color: Color

The default background color of Card.

contentPadding

val contentPadding: PaddingValues

Default content padding used for a Card

This affects the outermost content padding applied around the content container. Note that there is additional padding applied around the content / text / icons inside a card, this only represents the outer padding for the entire content.

shape

val shape: Shape

The default shape of Card, which determines its corner radius.