Badge
Functions summary
Unit |
@ComposableA badge represents dynamic information such as a number of pending requests in a navigation bar. |
Cmn
|
Functions
Badge
@Composable
fun Badge(
modifier: Modifier = Modifier,
containerColor: Color = BadgeDefaults.containerColor,
contentColor: Color = contentColorFor(containerColor),
content: (@Composable RowScope.() -> Unit)? = null
): Unit
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: Modifier = Modifier |
the |
containerColor: Color = BadgeDefaults.containerColor |
the color used for the background of this badge |
contentColor: Color = contentColorFor(containerColor) |
the preferred color for content inside this badge. Defaults to either the matching content color for |
content: (@Composable RowScope.() -> Unit)? = null |
optional content to be rendered inside this badge |