Components
Badge
Indicator of values such as labeling or notification
Component Status Details
Status component contains a list of checks and completeness that has been tested and owned by each component


Badge are small status descriptors for ui elements. A badge consists of a small circle, usually containing a number or other short character, that appears near other objects. Badges should always be applied to block level elements.
Usage
The following is the format for using Badge.
LgnBadge(iconLeft = {Icon(imageVector = Icons.Default.Warning, contentDescription = "")},iconRight = {Icon(imageVector = Icons.Default.Warning, contentDescription = "")}) {Text(text = "123")
Variants
Size
Badges has two sizes, Medium
and Small
.
//Badge MediumLgnBadge(size = LgnBadgeSize.Medium) {Text(text = "123")}//Badge SmallLgnBadge(
Appearance
There are 3 appearance that you can use for Badge.
Dot
Dot is basic usage of Badge .
LgnBadgeDot()
Label
You can give label to your Bagde by adding Text
parameter.
LgnBadge() {Text(text = "123")}
Rounded
You can give icon on center of the badge rounded.
LgnBadgeRounded() {Icon(imageVector = Icons.Default.AccountCircle, contentDescription = "")}
Attributes
LgnBadge
Parameter | Type | Description |
---|---|---|
modifier | Modifier | A modifier that can be used to adjust the layout or drawing content. |
iconLeft | @Composable (() -> Unit)? | A composable function that describes the icon on the left side of the badge. |
iconRight | @Composable (() -> Unit)? | A composable function that describes the icon on the right side of the badge. |
containerColor | Color | The color of the badge container. |
contentColor | Color | The color of the badge content. |
border | LgnBorderStroke | The border of the badge. |
size | LgnBadgeSize | The size of the badge. |
content | @Composable () -> Unit | A composable function that describes the content of the badge. |
LgnBadgeDot
Parameter | Type | Description |
---|---|---|
modifier | Modifier | A modifier that can be used to adjust the layout or drawing content. |
color | Color | The color of the badge. |
border | LgnBorderStroke | The border of the badge. |
size | LgnBadgeSize | The size of the badge. |
LgnBadgeRounded
Parameter | Type | Description |
---|---|---|
modifier | Modifier | A modifier that can be used to adjust the layout or drawing content. |
containerColor | Color | The color of the badge container. |
contentColor | Color | The color of the badge content. |
border | LgnBorderStroke | The border of the badge. |
size | LgnBadgeSizeRounded | The size of the badge. |
content | @Composable () -> Unit | A composable function that describes the content of the badge. |