Badge

Badges are used to indicate the status of an item for quick recognition.

TypeResource
DesignFigma
MobileMobile Storybook
CodeGitlab

Badge Preview

Usage

To implement Badge, you can use this tag Badge in the Kotlin file.

  import id.co.biofarma.binduiandroid.components.badge.Badge
    Badge(
        label="Badge Label",
        type="solid",
        variant="default",
        size="sm",
        radius="none",
        icon={}
    )

Examples

Variant

Set the variant prop to default, info, success, warning or danger for different color.

Badge Variant

Props

PropsRequiredDefaultTypedescription
idfalse-stringA unique identifier for the badge.
labeltrue-stringLabel text on badge.
variantfalsedefaultdefault, info success warning dangerThe visual color variant of the badge.
typefalsesolidsolid subtle outlineThe visual style of the badge.
sizefalsesmsm lgThe size of the badge.
radiusfalsenonenone xs sm md lg fullCorner radius of the badge.
showIconfalsefalsetrue falseIf true, the icon will appear
iconfalse-ComposeableA composable function that describes the icon on the left side of the badge.
stylefalse-modifierTo decorate or add behavior to Compose UI elements
BIND © Biofarma Innovate Next-level Design .