Skip to main content
Give us your valuable feedback

It will help us understand how we can serve you better

Give feedback

Components

Badge

Indicator of values such as labeling or notification

banner-Badge
Component Status Details

Status component contains a list of checks and completeness that has been tested and owned by each component

check-list-icon We don't use color as the only visual tool to convey information.
check-list-icon The component’s structure and properties include relevant options such as variant, style, size, orientation, optional iconography, decorations, selection, error state, etc.check-list-icon The title is the component name that uses the frame base component template.check-list-icon The base component name contains: .Base & "Component Name" if there is more than one.check-list-icon All component properties use the Legion foundation.
check-list-icon We can change all the parts that are connected to the component base.check-list-icon The inside of the base component remains connected to the master component.check-list-icon All variant options are not damaged when we change from one to another.check-list-icon Overriding changes to components will not reset other variants.
check-list-icon Component's already has component specs documentation.

Status

Resources

Upcoming Upcoming


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 Medium
LgnBadge(
size = LgnBadgeSize.Medium
) {
Text(text = "123")
}
//Badge Small
LgnBadge(

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

ParameterTypeDescription
modifierModifierA 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.
containerColorColorThe color of the badge container.
contentColorColorThe color of the badge content.
borderLgnBorderStrokeThe border of the badge.
sizeLgnBadgeSizeThe size of the badge.
content@Composable () -> UnitA composable function that describes the content of the badge.

LgnBadgeDot

ParameterTypeDescription
modifierModifierA modifier that can be used to adjust the layout or drawing content.
colorColorThe color of the badge.
borderLgnBorderStrokeThe border of the badge.
sizeLgnBadgeSizeThe size of the badge.

LgnBadgeRounded

ParameterTypeDescription
modifierModifierA modifier that can be used to adjust the layout or drawing content.
containerColorColorThe color of the badge container.
contentColorColorThe color of the badge content.
borderLgnBorderStrokeThe border of the badge.
sizeLgnBadgeSizeRoundedThe size of the badge.
content@Composable () -> UnitA composable function that describes the content of the badge.