Compose Component

LeadingImageCard

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.")
    }
}

NonFocusableCardWithButtonGroupSample

@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
// -------------------------------------------------------------------------------------------------
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: