Badge

fun Badge(modifier: Modifier = Modifier, containerColor: Color = BadgeDefaults.containerColor, contentColor: Color = BadgeDefaults.contentColor, content: @Composable RowScope.() -> Unit? = null)

A badge represents dynamic information such as a number of pending requests in a navigation bar.

Badges can be icon only or contain short text.

See BadgedBox for a top level layout that will properly place the badge relative to content such as text or an icon.

Parameters

modifier

the Modifier to be applied to this badge

containerColor

the color used for the background of this badge

contentColor

the preferred color for content inside this badge

content

optional content to be rendered inside this badge