JengaBadge

fun JengaBadge(text: String, modifier: Modifier = Modifier, tone: JengaBadgeTone = JengaBadgeTone.Neutral, colors: JengaBadgeColors = JengaBadgeDefaults.colors(tone), shape: Shape = JengaBadgeDefaults.shape, contentPadding: PaddingValues = JengaBadgeDefaults.contentPadding, textStyle: TextStyle = JengaBadgeDefaults.textStyle)(source)

A small status/label pill. The text is shown as written.

Parameters

text

the badge label.

modifier

the Modifier for this badge.

tone

the semantic tone; see JengaBadgeTone.

colors

the color set; defaults to JengaBadgeDefaults.colors for tone.

shape

the badge shape.

contentPadding

padding inside the badge.

textStyle

the label text style.

Samples

JengaBadge(
    text = "Valid",
    tone = JengaBadgeTone.Success,
)

fun JengaBadge(text: AnnotatedString, modifier: Modifier = Modifier, tone: JengaBadgeTone = JengaBadgeTone.Neutral, colors: JengaBadgeColors = JengaBadgeDefaults.colors(tone), shape: Shape = JengaBadgeDefaults.shape, contentPadding: PaddingValues = JengaBadgeDefaults.contentPadding, textStyle: TextStyle = JengaBadgeDefaults.textStyle)(source)

A small status/label pill with styled text (e.g. a bold count).

Parameters

text

the badge label.

modifier

the Modifier for this badge.

tone

the semantic tone; see JengaBadgeTone.

colors

the color set; defaults to JengaBadgeDefaults.colors for tone.

shape

the badge shape.

contentPadding

padding inside the badge.

textStyle

the label text style.