Compose Component

ActionCard

ActionCard is a version of a card that contains a primary action that is placed inside the card along the bottom edge of the card.

ActionCardWithTitleSample

@Sampled
@Composable
fun ActionCardWithTitleSample() {
    ActionCard(action = { Button(onClick = {}) { Text("Send") } }, title = { Text("Title") }) {
        Text("This is an action card with a title")
    }
}

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: