---
title: "Badge"
description: "Badge is a component that can contain dynamic information, such as the presence of a new
notification or a number of pending requests. Badges can be icon only or contain short text."
type: "component"
---

<div class='type'>Composable Component</div>



Badge is a component that can contain dynamic information, such as the presence of a new
notification or a number of pending requests. Badges can be icon only or contain short text.

<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
@Composable
fun Badge(
    modifier: Modifier = Modifier,
    backgroundColor: Color = MaterialTheme.colors.error,
    contentColor: Color = contentColorFor(backgroundColor),
    content: @Composable (RowScope.() -> Unit)? = null,
)
```


#### Parameters

| | |
| --- | --- |
| modifier | optional `Modifier` for this item |
| backgroundColor | the background color for the badge |
| contentColor | the color of label text rendered in the badge |
| content | optional content to be rendered inside the badge |






