TonalBadge

fun TonalBadge(text: String, modifier: Modifier = Modifier, color: Color = MaterialTheme.colorScheme.primary)

A short label on a tinted background, such as an HTTP method, a status code, or a severity.

color tints the background and supplies the preferred text color; unreadable text falls back to the on-surface role. Pass an accent role (primary, error, kmpColors.success, ...), not an on* role. Use the StatusTone overload for semantic states.


fun TonalBadge(text: String, tone: StatusTone, modifier: Modifier = Modifier)

A TonalBadge colored like a StatusMessage of the same tone.