Composable Component

TitleChip

Title Chip is a component used to provide context for associated content, such as a Card.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

TitleChipSample

@Composable
fun TitleChipSample() {
    TitleChip { Text("Messages") }
}

TitleChipWithCardSample

@Composable
fun TitleChipWithCardSample() {
    Column(horizontalAlignment = Alignment.CenterHorizontally) {
        TitleChip { Text("Title Chip") }
        Spacer(Modifier.height(TitleChipDefaults.associatedContentSpacing))
        Card(
            title = { Text("Title") },
            subtitle = { Text("Subtitle") },
            leadingIcon = { Icon(FavoriteIcon, "Localized description") },
        ) {
            Text("Card Content")
        }
    }
}

TitleChipWithLeadingIconSample

@Composable
fun TitleChipWithLeadingIconSample() {
    TitleChip(leadingIcon = { Icon(FavoriteIcon, "Localized description") }) { Text("Messages") }
}