Card

fun Card(modifier: Modifier = Modifier, shape: Shape = SparkTheme.shapes.medium, colors: CardColors = CardDefaults.cardColors(), border: BorderStroke? = null, content: @Composable ColumnScope.() -> Unit)(source)

Deprecated

Use Card.Flat for a simple card with default styling, or use Card with CardColors for more customization

Replace with

import com.adevinta.spark.components.card.Card
Card.Flat(modifier = modifier, shape = shape, content = content)

Spark card.

Cards contain content and actions that relate information about a subject. Filled cards provide subtle separation from the background. This has less emphasis than elevated or outlined cards.

Card image

Parameters

modifier

the Modifier to be applied to this card

shape

the shape of this card

colors

CardColors that will be used to resolve the colors used for this card in different states. See CardDefaults.cardColors

border

the border to draw around the container of this card

content

content of the card


fun Card(onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, shape: Shape = SparkTheme.shapes.medium, colors: CardColors = CardDefaults.cardColors(), border: BorderStroke? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, content: @Composable ColumnScope.() -> Unit)(source)

Deprecated

Use Card.Flat with onClick for a clickable card with default styling, or use Card with onClick and CardColors for more customization

Replace with

import com.adevinta.spark.components.card.Card
Card.Flat(onClick = onClick, modifier = modifier, shape = shape, content = content)

Spark card.

Cards contain content and actions that relate information about a subject. Filled cards provide subtle separation from the background. This has less emphasis than elevated or outlined cards.

Card image

Parameters

onClick

called when this card is clicked

modifier

the Modifier to be applied to this card

enabled

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.

shape

the shape of this card

colors

CardColors that will be used to resolve the colors used for this card in different states. See CardDefaults.cardColors

border

the border to draw around the container of this card

interactionSource

the MutableInteractionSource representing the stream of Interactions for this card. You can create and pass in your own remembered instance to observe

content

content of the card