Skip to main content

CamoCard

A group of related content (a product, an article, a setting) on a surface. With onClick the whole card is one button, its content the name; without it the card is plain content. A non-null selected makes it a selectable card (plans, payment methods). It has no padding of its own by default, so images can reach its edges: pad the content.

Usage​

CamoCard(onClick = { openProject() }, modifier = Modifier.fillMaxWidth()) {
Column(Modifier.padding(Camouflage.spacing.l)) {
CamoText("Camouflage", style = Camouflage.typography.titleMedium)
CamoText("Updated 2 hours ago")
}
}

API​

public fun CamoCard(
modifier: Modifier = Modifier,
onClick: (() -> Unit)? = null,
appearance: Appearance? = null,
tone: Tone = Tone.Default,
enabled: Boolean = true,
selected: Boolean? = null,
interactionSource: MutableInteractionSource? = null,
content: @Composable () -> Unit,
)
NameTypeDefault
modifierModifierModifier
onClick(() -> Unit)?null
appearanceAppearance?null
toneToneTone.Default
enabledBooleantrue
selectedBoolean?null
interactionSourceMutableInteractionSource?null
content@Composable () -> Unitrequired
Design notes

Why CamoCard works this way, its states and its edge cases: contributor docs.