Compose Component

OutlinedChip

Wear Material OutlinedChip that offers three slots and a specific layout for an icon, label and secondaryLabel.

OutlinedChipWithIconAndLabel

@Sampled
@Composable
fun OutlinedChipWithIconAndLabel() {
    OutlinedChip(
        onClick = { /* Do something */ },
        enabled = true,
        // Primary label can have up to 3 lines of text
        label = {
            Text(
                text = "Main label can span up to 3 lines",
                maxLines = 3,
                overflow = TextOverflow.Ellipsis,
            )
        },
        icon = {
            Icon(
                painter = painterResource(id = R.drawable.ic_airplanemode_active_24px),
                contentDescription = "airplane",
                modifier =
                    Modifier.size(ChipDefaults.IconSize).wrapContentSize(align = Alignment.Center),
            )
        },
    )
}
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: