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
- Kotlin
- Dart
CamoCard(onClick = { openProject() }, modifier = Modifier.fillMaxWidth()) {
Column(Modifier.padding(Camouflage.spacing.l)) {
CamoText("Camouflage", style = Camouflage.typography.titleMedium)
CamoText("Updated 2 hours ago")
}
}
API
- Kotlin
- Dart
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,
)
| Name | Type | Default |
|---|---|---|
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 | required |
Design notes
Why CamoCard works this way, its states and its edge cases: contributor docs.