CardDefaults
object CardDefaults
Functions
Link copied to clipboard
fun cardColors(containerColor: Color = SparkTheme.colors.backgroundVariant, disabledContainerColor: Color = SparkTheme.colors.neutralContainer
.copy(alpha = DisabledAlpha)
.compositeOver(SparkTheme.colors.surface), disabledContentColor: Color = SparkTheme.colors.contentColorFor(containerColor).copy(DisabledAlpha)): CardColors
Link copied to clipboard
fun cardElevation(defaultElevation: Dp = ElevationTokens.Level0, pressedElevation: Dp = ElevationTokens.Level0, focusedElevation: Dp = ElevationTokens.Level0, hoveredElevation: Dp = ElevationTokens.Level1, draggedElevation: Dp = ElevationTokens.Level3, disabledElevation: Dp = ElevationTokens.Level0): CardElevation
Creates a CardElevation that will animate between the provided values according to the Material specification for a Card.
Link copied to clipboard
fun elevatedCardColors(containerColor: Color = SparkTheme.colors.backgroundVariant, contentColor: Color = SparkTheme.colors.contentColorFor(containerColor), disabledContainerColor: Color = SparkTheme.colors.surface
.copy(alpha = DisabledAlpha)
.compositeOver(
SparkTheme.colors.surfaceColorAtElevation(ElevationTokens.Level1),
), disabledContentColor: Color = contentColor.copy(DisabledAlpha)): CardColors
Link copied to clipboard
fun elevatedCardElevation(defaultElevation: Dp = ElevationTokens.Level1, pressedElevation: Dp = ElevationTokens.Level1, focusedElevation: Dp = ElevationTokens.Level1, hoveredElevation: Dp = ElevationTokens.Level2, draggedElevation: Dp = ElevationTokens.Level4, disabledElevation: Dp = ElevationTokens.Level1): CardElevation
Creates a CardElevation that will animate between the provided values according to the Material specification for an ElevatedCard.
Link copied to clipboard
Link copied to clipboard
fun outlinedCardColors(containerColor: Color = SparkTheme.colors.backgroundVariant, contentColor: Color = SparkTheme.colors.contentColorFor(containerColor), disabledContainerColor: Color = containerColor, disabledContentColor: Color = contentColor.copy(DisabledAlpha)): CardColors
Link copied to clipboard
fun outlinedCardElevation(defaultElevation: Dp = ElevationTokens.Level0, pressedElevation: Dp = defaultElevation, focusedElevation: Dp = defaultElevation, hoveredElevation: Dp = defaultElevation, draggedElevation: Dp = ElevationTokens.Level3, disabledElevation: Dp = ElevationTokens.Level0): CardElevation
Creates a CardElevation that will animate between the provided values according to the Material specification for an OutlinedCard.