LeadingImageCard is a component used to group related information into a single digestible unit, featuring a leading image.
LeadingImageCardSample
@Sampled
@Composable
fun LeadingImageCardSample() {
LeadingImageCard(
image = { Image(MyImage, "Localized description") },
title = { Text("Title") },
subtitle = { Text("Subtitle") },
) {
Text("This is a card with a leading image.")
}
}
@Sampled
@Composable
fun NonFocusableCardWithButtonGroupSample() {
Column(verticalArrangement = Arrangement.spacedBy(GlimmerTheme.componentSpacingValues.large)) {
Card(focusable = false) { Text("This is a non-focusable card with a button group") }
ButtonGroup(modifier = Modifier.fillMaxWidth()) {
Button(onClick = {}) { Text("Button 1") }
Button(onClick = {}) { Text("Button 2") }
Button(onClick = {}) { Text("Button 3") }
}
}
}
// -------------------------------------------------------------------------------------------------
// ActionCard samples
// -------------------------------------------------------------------------------------------------